Skip to content
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

Deprecate usage of doc-endnote[s] ARIA roles in footnote extension #258

Closed
2 of 3 tasks
schnerring opened this issue Oct 17, 2021 · 5 comments
Closed
2 of 3 tasks
Labels
pinned issue should not be closed by stalebot

Comments

@schnerring
Copy link


Running Google Lighthouse on Goldmark output containing footnotes causes the following error:

Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions.

Google Lighthouse now seems to adhere to version 1.1 of the ARIA spec. The docs regarding the error (linked from Lighthouse) also reference version 1.1 of the spec. The spec states:

The doc-endnote and doc-bilbioentry roles are being deprecated due to their incompatibility with the core ARIA inheritance model for roles (i.e., ARIA’s list role cannot be satisfied by list item roles in a module)

w3c/epubcheck#1018 (comment) states:

Moving forward, there will just be footnotes [doc-footnote], and if you want to make a list of them just wrap them in a list.

And w3c/epubcheck#1018 (comment) clarifies:

NOTE
The doc-endnote role was designed for use as a list item, but due to clarifications in the WAI-ARIA specification, it is not valid as a child of the list role. As the doc-endnotes role already identifies a section of endnotes, authors are instead advised to use the list and listitem roles when native HTML elements cannot be used to structure the entries. The doc-footnote role can be used within each list item to identify individual notes when necessary.

My guess would be to use doc-footnote in place of doc-endnote.

schnerring added a commit to schnerring/goldmark that referenced this issue Oct 17, 2021
@jmooring
Copy link
Contributor

w3c/epubcheck#1018 (comment)

There's an updated working draft coming soon. In it, endnotes are implied on the immediate list item descendants of a doc-endnotes marked section and the use of doc-footnote is not allowed. This was done to avoid the ambiguity of whether the content within the list item is a footnote or endnote.

But this does make things simpler, as you can simply drop the explicit role and there's still an assumption that the list items are endnotes.

So, at some point we can eliminate the role attribute from the list items, but I don't know when that should happen.

@yuin yuin added the pinned issue should not be closed by stalebot label Nov 24, 2021
@tristan957
Copy link

Happy to help move this along if possible/necessary.

@Seirdy
Copy link

Seirdy commented Apr 3, 2022

@schnerring dequelabs/axe-core is what power's most of Lighthouse's accessibility audits (and the a11y audits for pretty much every checker written in JavaScript). v4.4.1 of axe-core has deprecated doc-endnote, FWIW; see Lighthouse's issue 12432.

Once Lighthouse bumps its axe-core dep, Lighthouse won't have that issue anymore. (Edit: done; lighthouse@next uses Axe 4.4.1 and actually docks a11y points for any use of doc-endnote)

Seirdy added a commit to Seirdy/seirdy.one that referenced this issue Apr 6, 2022
Temporary measure for use with Goldmark till it drops this

see yuin/goldmark#258
@yuin yuin closed this as completed in 113ae87 Apr 24, 2022
@yuin
Copy link
Owner

yuin commented Apr 24, 2022

Version 1.1 says:

Authors MUST NOT declare elements with the role doc-footnote within the endnotes as it is redundant with the implied role.

So I've removed role attributes from footnote list items.

@tristan957
Copy link

Thanks for your work on this. Can't wait to see it in a release and get picked up by Hugo downstream :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned issue should not be closed by stalebot
Projects
None yet
Development

No branches or pull requests

5 participants