-
Notifications
You must be signed in to change notification settings - Fork 0
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
The light/dark toggle button does not communicate its state #76
The light/dark toggle button does not communicate its state #76
Comments
Not sure if we should also address pydata/pydata-sphinx-theme#1491 |
I'm not sure I completely understand, can you expand on what should be done here, or how that should affect the accessibility tree ? |
We went over this is in the team sync yesterday. Reiterating here, for reference, the issue is that when you cycle through the three states (light, dark, auto) of the light/dark button (which is in the top right of the PST docs), the current state of the button is reflected visually, but nowhere is this visual state communicated in a textual way in the DOM. For assistive tech, it's important that the current state of the button is reflected in the accessibility tree. |
Thanks, I managed to see the accessibility tree in my dev console and will look into modifying it when the button switches. |
I'm reading the various aria things, and I'm wondering if the theme switch button should be an option dropdown with 3 options (auto, light, & dark). It seem like a 3 state button is a bit of a hack (and maybe less discoverable than an option?) I think the UI could be almost identical, but making it an option would maybe solve most of our Accessibility concerns. Thoughts ? |
Also, I'm not sure we can do anything abut that, but the button tooltip on hover/focus seem to be added/removed by js (via bootstrap?), which removes and add a new Should this aria-describedby (and tooltip element) always be present, but just visually hidden to be properly supported by screen readers ? |
And I suppose I mean a select |
Ok, so select won't work because we can't style it with icons. So we have a to do a custom dropdown which does not fix our accessibility issue. aria-desciption does no show up in the accessibility tree, and aria-label is already set to I guess we can change the aria label to a dynamic string like : "Switch theme. Current theme : %s". though it's unclear how to translate a dynamic js string. I also realize that "auto" is unclear. MDN uses "Os default" as a description. |
Responding to some of your points:
|
This will add a `<title>` attribute to the SVG generated by font awesome, which will in turn update the Accessibility tree, which will now be - button "light/dark" focusable: true focused: bool - image: $title-text Should fix Quansight-Labs/czi-scientific-python-mgmt#76
Some thoughts from today's call:
|
It communicates it visually but not through the accessibility tree
The text was updated successfully, but these errors were encountered: