-
Notifications
You must be signed in to change notification settings - Fork 1
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 navbar and footer #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work @Mandrenkov ! The accessibility of the navbar and footer is much improved. I only noticed two remaining screen reader issues:
- For the toggle buttons to open/close the navbar submenus on desktop, the screen reader correctly reads the aria-label and then says "To click this button, press CONTROL OPTION SPACE", which is normal behaviour. However, pressing CONTROL OPTION SPACE in this case does nothing for some reason. Pressing ENTER does work to toggle these buttons, but they should also work the way the screen reader expects.
- Nice working trapping keyboard focus in the mobile menu! Unfortunately screen reader focus is not trapped, so that should be fixed if possible.
Hey @Mandrenkov, the navbar no longer works for me on Firefox with this change (can't access the dropdown menus) |
Thanks for letting me know, @josh146!
Can you clarify what OS you're using and whether the dropdown menu issue is specific to desktop or mobile? |
This is on a Mac M1, and with desktop 🤔 Hovering over the navbar, and clicking on the down arrows, isn't doing anything. I tested on Chrome, and everything works |
Thanks for the review, @LucasSilbernagel !
Nice catch! I was able to fix this by adding a
I'm not sure how to reproduce this issue: using |
@Mandrenkov I don't know which screen reader you're using, but with VoiceOver on Mac, moving between elements is usually done by holding down Ctrl + Option and then navigating with the left and right arrow keys. The reason for this is that Tab navigation only focuses on interactive elements like buttons and links, so it skips over readable content like paragraphs. |
Thanks for the clarification, @LucasSilbernagel! I was able to achieve the desired result by adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes @Mandrenkov ! I just noticed one new issue (in the Xanadu Sphinx Theme preview): when viewing the navbar on desktop and navigating with my keyboard, if I focus on a submenu toggle button and press the Enter key, the menu opens and then closes right away.
Amazing catch, @LucasSilbernagel! I'm not sure how I didn't notice that it broke. 😅 Should be fixed now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @Mandrenkov !
**Context:** A recent [XST PR](XanaduAI/xanadu-sphinx-theme#44) introduced a breaking change to the theme configuration. **Description of the Change:** This PR upgrades the XST version to v0.5.0 and patches any breaking changes. It also adds a **Discord** link to the footer. **Benefits:** * See the [v0.5.0](https://github.com/XanaduAI/xanadu-sphinx-theme/releases/tag/v0.5.0) release notes of the XST. **Possible Drawbacks:** None. **Related GitHub Issues:** None. --- **Preview:** https://xanaduai-pennylane--40.com.readthedocs.build/projects/sphinx-theme/en/40/
Context:
There were a number of accessibility issues introduced in v0.4.0 of the XST, including:
alt
text for navbar images.<a>
and<button>
elements.ENTER
andECS
controls for menu buttons.Description of the Change:
This PR addresses all of the issues in the context. It also introduces:
navbar_logo_alt
theme option to control the alternative text in the navbar.name
field to the social icons in the footer to populate ARIA labels.The version number is also bumped to v0.5.0 to account for (2) above.
Benefits:
Possible Drawbacks:
None.
Related GitHub Issues:
None.
Previews: