Repository navigation
Description
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.)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
mattgarrish commentedon Jun 3, 2025
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.
mattgarrish commentedon Jun 4, 2025
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?
iherman commentedon Jun 4, 2025
Actually, this question is addressed by the ITS specification itself. In its section on XHTML, it says:
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...mattgarrish commentedon Jun 4, 2025
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.
feat: allow `its-*` attributes (ITS) in HTML