-
Notifications
You must be signed in to change notification settings - Fork 333
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
Remove uppercase transformation from sidebar tab items for accessibility reasons #2043
base: main
Are you sure you want to change the base?
Remove uppercase transformation from sidebar tab items for accessibility reasons #2043
Conversation
📦 Docs artifacts are ready: https://github.com/elixir-lang/ex_doc/actions/runs/12873336798/artifacts/2457747428 |
FWIW, the vitepress plugin makes the font a bit darker, docusaurus changes the color of the selected item. We probably want to apply this here and to our regular tabsets. Another option is to bold the currently selected item. |
I tried the increased font-weight locally to all of them and I thought it was still too subtle. :( You can see in the image above vitepress is also changing other styles besides of only the border. |
i suppose we could slightly lower the opacity of inactive elements but that would be horrible for readability if we keep the light font. |
I agree. I will play with some ideas too. WDYT about bolding the current selection? I want to avoid changing the font color though, because that changes per theme and language, and it will be hard to guarantee all languages look good across all themes. |
bolding the current selection would cause a slight layout shift when changing selection and the light weight font would still be an issue since the recommended value is 500 which is the same in all documentation engines i've worked with |
Good point on bolding and there is no need to repeat the information we are discussing in the other issue, I am aware. In any case, if we cannot make the tabs look better in isolation, then we may need to look for other approaches. |
i repeated the info for other participants in the other issue to be aware because it's related to the font issue |
Improved readability by removing the uppercase transformation from sidebar list items.
this solution even saves horizontal space
Important for accessibility
research:
https://www.a11y-101.com/design/capitalisation
https://accessibility.huit.harvard.edu/design-readability
tldr: The best thing to do is to avoid uppercase letters
before
after