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

Fix accessibility issue with top-level breadcrumb in ReadTheDocs theme #3129

Merged
merged 3 commits into from Apr 28, 2023

Conversation

micahellison
Copy link
Contributor

Fixes #2827.

This fix matches the change in the upstream ReadTheDocs theme by replacing an A tag's invalid "alt" attribute with an "aria-label" attribute that screen readers can consume.

@ultrabug
Copy link
Member

ultrabug commented Mar 3, 2023

@micahellison thanks for your proposal. I'd like to ask why you think necessary to remove the support for translation of the "Docs" term to a fixed "Home" tho?

Can't you just change the alt by an aria-label while preserving the localization feature?

@micahellison
Copy link
Contributor Author

@micahellison thanks for your proposal. I'd like to ask why you think necessary to remove the support for translation of the "Docs" term to a fixed "Home" tho?

Can't you just change the alt by an aria-label while preserving the localization feature?

Yes, that was what I did at first, though I changed it to "Home" because I had the understanding that mkdocs wants to mirror the RTD Sphinx theme, and that theme uses "Home" instead of the translation. Line 25 here: https://github.com/readthedocs/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/breadcrumbs.html

I'm happy to change it back, though.

@oprypin oprypin merged commit f3f6631 into mkdocs:master Apr 28, 2023
15 checks passed
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.

Top-level "Docs" breadcrumb not readable by screen readers in ReadTheDocs theme
3 participants