-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
A11y for ToC (table of contents) #10507
Comments
It seems to me that this is a content issue. Even without a TOC, having the same headings in your document is confusing for all users, screen reader or not. Solution, make your headings unique. It would improve the experience for all users. |
Hey, thanks for taking some time to answer me ! You're totally right on this in most cases but I'm currently working on a migration guide in a technical documentation and I feel like people will be overflowed if I add some However, if you have any idea on how to name this kind of title, please feel free to propose anything for In a more general point of view, for the issue, does it mean that an option should be added to let people decide on each page which pages need such feature ? |
What is it that you think is wrong with your TOC html? I've had a look at your site and both the TOC and page heading structure for the version sections seem good. |
With a screen reader on the page you've seen, the links will be vocalized like:
So as there isn't any structure or |
Right! I get you. Screen reader users can already navigate directly to headings directly, so a TOC doesn't really add anything useful in that regard, it's just extra noise. The headings alone provide all the structure and functionality required. Maybe it's better to set aria-hidden on your TOC container? |
Hey there, I was a bit busy later days, sorry for my late answer. Your solution might actually work for people using AT. However, I had a discussion with an a11y expert and it seems, as you said first, that there isn't any issue with the actual implementation of Hugo because there's a structure around the links ( Thanks again for your time! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi there,
I use Hugo since a year now, but I'm not very familiar with Go language. I haven't spotted any issue referencing this so :
I was working on accessibility in my project and I think I found an issue with the ToC generation regarding the links. Indeed, in my project, several links have the same label (in a migration guide) but, links that have the same label and have a different target should be avoided at all point since it could be confusing for screen-reader users.
So I was wondering if a solution could be bring here directly (I could try to handle that). Otherwise I think I can handle this in my project as well using
partials/table-of-contents.html
.Issues
Expected
Regards.
The text was updated successfully, but these errors were encountered: