w3c / epub-specs

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

Fix aria-level values in caution boxes #2564

Closed mattgarrish closed 1 year ago

mattgarrish commented 1 year ago

The number extracted from the preceding heading level is being concatenated with "1" rather than added to it (e.g., aria-level="31" instead of the correct aria-level="4").

This fix forces the string to a number and also prevents the level from going over 6.

Fixes #2567