0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-19 11:52:21 +01:00
Patrick H. Lauke 212c0dfd07
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`
2023-01-01 21:54:46 -08:00
..
2022-12-24 18:37:22 +02:00
2022-12-24 18:37:22 +02:00