Skip to content

Add the ITS Attribute set to the as an allowed HTML extension item #2732

Closed

Description

@iherman

Section

https://www.w3.org/TR/epub-34/#sec-xhtml-extensions

Describe the problem

The §6.1.3 section on HTML extensions lists some features that can be used in an HTML content document without further ado (ie, without additional definitions like namespaces). Epubcheck checks these and rejects attributes that are not listed in this section. Currently, the (non-deprecated) extensions are the usage of epub:type (epub-type for non-XML) attribute and the RDFa attributes. Additionally to these, though not listed in the sections, the aria-* attributes are also usable the same way (as defined in the HTML specification proper).

However, the Internationalization Tag Set W3C standard defines an attribute set which is not listed in EPUB. These attributes are used, among other things, for the creation and the processing of multilingual content, giving hints for translations, etc. For example, the Requirement for Chinese Text Layout Note uses one of the ITS attributes to switch the text between traditional and simplified Chinese characters, as well as English. The switch is done via a tiny local JavaScript that relies on that attribute. (The example is an HTML page, but it can be converted into EPUB.)

The problem therefore is that an EPUB instance using the ITS attribute is invalid. I believe that is a problem

Describe the fix or new feature you propose

The proposal is to add a separate sub section to §6.1.3 section allowing the usage of all the its-* attributes in an HTML content document.

(Note that other, similar specifications at W3C may come to the fore at some point. We may think about a somewhat more general way of making these extensions possible, without being forced to take each individual extension one-by-one. But we may decide to control this in the future, too, and handling these one-by-one.)

@mattgarrish @rdeltour @xfq

Activity

  1. self-assigned this
    on Jun 3, 2025
  2. added
    Spec-EPUB3The issue affects the core EPUB 3.X Recommendation
    i18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.
    on Jun 3, 2025
  3. mattgarrish commented on Jun 3, 2025

    @mattgarrish
    Member

    Right, ITS is what HTML calls a vendor-neutral extension - i.e., it has to be added as an "applicable specification" to be recognized. We note at the beginning of our extension section that such vendor-neutral extensions need to be listed there to be valid.

    I don't have an opinion one way or the other on ITS. I assume reading system support will be optional, like for RDFa, in which case I don't see any harm in allowing.

  4. mattgarrish commented on Jun 4, 2025

    @mattgarrish
    Member

    allowing the usage of all the its-* attributes in an HTML content document

    Since we don't have html content documents yet, and even if we do we still have xhtml to contend with, what does this require in terms of the two separate sections on how to use ITS attributes in HTML/XHTML?

    Are we allowing both syntaxes, even within xhtml content documents, only its: prefixed attributes in xhtml and only its- attributes in the possible html (for similarity with epub:type and epub-type), or only its- attributes regardless of the syntaxes we support?

  5. iherman commented on Jun 4, 2025

    @iherman
    MemberAuthor

    Actually, this question is addressed by the ITS specification itself. In its section on XHTML, it says:

    XHTML documents aimed at public consumption by Web browsers, including HTML5 documents in XHTML syntax, SHOULD use the syntax described in Section 6: Using ITS Markup in HTML in order to adhere to DOM Consistency HTML Design Principle.

    Which means, in practice, that we should keep to the its-* format in my view: all examples, tools, scripts, etc, relying or using ITS would rely on that format. Using the XML namespace format would just muddy the waters...

  6. mattgarrish commented on Jun 4, 2025

    @mattgarrish
    Member

    It's the should that was problematic since it implies you can use both in xhtml.

    Since we have no legacy content to contend with here, I'm fine making this a must, but we should override the ITS spec then in our extension.

  7. moved this from In review to Done in PM/EPUB issueson Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Spec-EPUB3The issue affects the core EPUB 3.X Recommendationi18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

⌂ 换网址