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

Improve accessibility of TOC links by adding "title" attr #4268

Closed
wants to merge 1 commit into from

Conversation

eduardomozart
Copy link
Contributor

No description provided.

@splitbrain
Copy link
Collaborator

I don't see how this improves accessibility. It only repeats information that is already there.

If you want to work on accessibility issues, look into the tickets in https://github.com/dokuwiki/dokuwiki/projects/5

@eduardomozart
Copy link
Contributor Author

eduardomozart commented Apr 22, 2024

There's some programs like NVDA (Non Visual Desktop Access) that uses title attr of links and images to parse text of links and images. In some templates, like "Read the Dokus", instead of showing the text hovered of on TOC, it shows the page title, as can be seen below when hovering the "Information" subtopic.
image
It doesn't seems to be HTML error on template itself because it calls the tpl_toc() function to render the TOC.

@mprins
Copy link
Contributor

mprins commented Apr 23, 2024

Not a good idea.

Please read https://www.a11yproject.com/posts/creating-valid-and-accessible-links/
Notably the section

It is therefore not recommended to use the title attribute on elements. If you do use it don't double up on the accessible name of the link, this can produce unnecessary duplicate announcements to some screen readers.

@eduardomozart
Copy link
Contributor Author

eduardomozart commented Apr 23, 2024

In that case, where title overrides the link text, it would also cause a trouble for screen readers which would not read the link as expected. There's seems to be no error on HTML side. I'll mark @my17560 on this issue so maybe he could provide useful info, as it may be a specific template issue.
Edit: It seems that the latest update for the template seems to fix this issue.

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.

None yet

3 participants