-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: Make theme switcher accessible (#37780)
* Make theme switcher accessible * set an explicit `aria-label` to the switcher (as the `<span>` is not sufficient, as it can be display:none'd and then the button has no accName) * make the theme buttons actual `aria-pressed` toggles * Dynamically update aria-label for theme switcher * Explicitly reset focus after activating theme * Use innerText for the constructed dynamic aria-label this way, if the text ever gets changed in the html, this will adapt appropriately * Tweak accessible name for the dropdown * Fixup * Use `textContent` instead of `innerText`
- Loading branch information
1 parent
2cc580e
commit 212c0df
Showing
2 changed files
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters