daisy / ace

Ace by DAISY, an Accessibility Checker for EPUB
MIT License
75 stars 22 forks source link

Support private language tags #169

Open acabal opened 6 years ago

acabal commented 6 years ago

Please provide the following details if possible or relevant:

Some of our ebooks feature italics for "alien" languages. When used in that way, we include a private language subtag in the source. For example, in The Moon Pool:

<p>“Hold up ten times twenty of our <i xml:lang="x-murian">corials</i> with but two fingers⁠—and these <i xml:lang="x-murian">corials</i> of ours⁠—”</p>

In the IANA spec, x- denotes that the language tag is in "private" use; that is, it is known that the language tag does not correspond to valid existing language tag. However, Ace outputs this error when it encounters these private-use subtags:

Value of lang attribute not included in the list of valid languages

I think Ace should probably ignore private language subtags for accessibility-checking purposes.

WilcoFiers commented 6 years ago

As an FYI, axe-core lets you add languages in the checks options. This isn't documented, but might be helpful.

rdeltour commented 6 years ago

axe-core lets you add languages in the checks options. This isn't documented, but might be helpful.

Great, thanks for the tip!

danielweck commented 2 years ago

I tested https://standardebooks.org/ebooks/a-merritt/the-moon-pool and I confirm that the latest version of Ace (which is based on the latest version of Axe) still reports valid-lang errors for xml:lang="x-ponapean":