-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: detect role=heading for outline #309
Conversation
@rdeltour is this roughly the right direction? |
Enables ace-extraction's getHeadings() to detect headings marked via role=heading; uses aria-level or the spec fallback. Fixes daisy#308
yes! 👍 |
Thanks, @rdeltour. Should I check aria-level values more carefully (e.g., non-negative) or will they be checked elsewhere anyway? |
yes, I think all the values that are not conforming (0 or negative values) should be reported as heading level 2 (default value). Ideally we should test this in browser+AT combinations to have a better idea how this is processed in real life, but until then sticking to the spec looks reasonable.
Apparently it's not checked by Axe (see dequelabs/axe-core#1288). I don't think it's checked by EPUBCheck (to be verified). |
@rdeltour I added a check for positive integers (also avoiding +'Infinity' becoming Infinity). |
@rdeltour will you let me know if you need anything else from me? |
no, it all looks good 👍. I'm just a little overloaded these days 😅 I'll do a final review and merge it ASAP! |
Thanks @rdeltour. No rush from my end, I just wanted to check before I lose track. |
@danielweck can this be included in the upcoming 1.2.0 version? |
I propose that we merge this PR into the Then I will (as usual) "backport" codebase changes from |
The |
The |
Thank you very much @pkra your contribution is much appreciated. Note that the The |
Enables ace-extraction's getHeadings() to detect headings marked
via role=heading; uses aria-level or the spec fallback.
Fixes #308