-
Notifications
You must be signed in to change notification settings - Fork 327
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
landmark-unique violation at /user_guide/theme-elements.html #1478
Comments
One seemingly easy way to solve this issue would be to label the header nav as "Site" or "Main" using The problem is that some pages, like the theme-specific elements page, can render the same table of contents twice: once at the top of the article, and once in the right sidebar under the heading "On this page." Currently, both of these TOCs are marked up in So a robust solution to the issue that this test failure exposes may be a bit challenging. A perfectly robust solution would require the renderer to know that there are two duplicated "page content" navs on the page and decide to markup only one of them with a However, maybe there are some "good enough" solutions. For example, if we can be pretty confident that most pages will have the "On this page" sidebar navigation, then maybe we can decide that the sidebar TOC gets rendered in a |
IMO the in-page TOC on the "theme-specific elements" page should just go away. It is redundant with the right sidebar TOC, which (by default anyway) is always present on all pages that have subsections. (and in general we shouldn't be putting in-page TOCs on pages where we don't suppress the sidebar in-page TOC) |
fully agreed, nuke the TOC 🚀 |
But I think @choldgraf specifically added the TOC to that page to check PST styles with the Furthermore, there are least two examples of its usage (in conjunction with the right-sidebar TOC) in the wild:
Looks like it was Docutils 0.18 that started using Here are the paths forward that I see, in no particular order:
|
here are my .2$ on the different suggestions you made:
|
If that's the reason, then we can do it in a test rather than on our live site (and validate that it looks right using selenium etc). IMO we shouldn't be adding things to the live site that are considered "bad practice" just to see if they work.
agreed. |
I opened a PR, #1607, that I think is a good compromise, let me know what you think! :) |
Sub-issue of #1428.
The landmark-unique violation shows up on the Theme-specific elements page because the following directive gets transformed into a
<nav>
element:As there is already another unlabelled
<nav>
on the page (in the header), this causes the Axe landmark-unique rule to fail.The text was updated successfully, but these errors were encountered: