nlbdev / nordic-epub3-dtbook-migrator

Tools for converting between a strict subset of DTBook and EPUB3.
http://nlbdev.github.io/nordic-epub3-dtbook-migrator/
GNU Lesser General Public License v2.1
8 stars 7 forks source link

Consider adding a check for fixed, language-specific values of alt texts, aria-labels, etc. #544

Open martinpub opened 1 year ago

martinpub commented 1 year ago

Section 5.2 of the 2020-1 guidelines lists some fixed values to be used for alt texts, aria-labels, schema.org metadata, nav.xhtml headings, etc.

For att least some of them, it would be nice to check the values of these against the main language of the book. Such a check would avoid e.g. having a note backlink in a Swedish book labelled "Gå til notereferansen." (the given value for Norwegian).

As some of labels mentioned are not always strictly required to have a controlled value (e.g. an epigraph might be labelled with a heading, etc.), and as sometimes Editing Instructions give specific instructions on a custom alt text, etc., the implementation of the check must be aware of which values will always be controlled and which will not be, and it should probably be a warning rather than an error.

Let me know what you think. The example above is a real-world example from MTM, and we just started thinking about if there are validation scenarios we could add to improve the quality in this regard.