w3c / epub-specs

Shared workspace for EPUB 3 specifications.
Other
305 stars 60 forks source link

algorithm error generating aria-level for caution headings #2567

Closed WBerndorfer closed 1 year ago

WBerndorfer commented 1 year ago

Seems, there is a coding error in the realization of heading levels for caution-notes on some W3C sites: https://github.com/w3c/epub-specs/blob/181828b283ee5e20546746057076d970e78ce1ea/epub33/common/js/add-caution-hd.js#L16

Example: https://www.w3.org/TR/epub-33/#sec-intro-relations aria-heading with an extraordinary value 31 for aria-level: <div class="caution" id="caution-0"> <div role="heading" aria-level="31" class="caution-title marker"> <span>Caution</span> </div>

Two digits concatenated together, but should be added mathematically.

iherman commented 1 year ago

This seems to be a class-1 modification request. I also believe it is a valid Erratum, so we should mark it as such

@wareid @shiestyle @TzviyaSiegman @dauwhe