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

Add explicit heading aria-level to complement heading role #456

Merged
merged 3 commits into from
Aug 29, 2021

Conversation

bollwyvl
Copy link
Collaborator

@bollwyvl bollwyvl commented Aug 27, 2021

References

Code Changes

  • ensures that any starttag which includes a ROLE will also get the (implicit) fallback aria-level of 2

@bollwyvl
Copy link
Collaborator Author

Ah, in the remaining failing case, it's not firing on the toc that's included directly in the content. Looks like doing it at the docutils level will be required.

@bollwyvl bollwyvl changed the title [wip] add explicit heading aria-level to complement heading role Add explicit heading aria-level to complement heading role Aug 27, 2021
@bollwyvl
Copy link
Collaborator Author

This may be a case where lighthouse is wrong, as the guidance suggests the implicit value is fine (even though it's required), but this gets us back to all green, even if I don't love it. As the docutils nodes aren't perfectly aligned with the semantic level of the document, I don't think we could get to a "right" number for both sidebars and in-content toctrees, much less any other captions we'd see.

Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM - it's not too complex and it makes things slightly better, so I am +1 :-)

@choldgraf choldgraf merged commit 2c99105 into pydata:master Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get CI audits back to passing
2 participants