Opened 2 years ago

Last modified 2 years ago

#34033 closed Bug

Admin light/dark theme switch needs to convey its state for screen reader users — at Version 2

Reported by: Thibaud Colas Owned by: Florian Perucki
Component: contrib.admin Version: dev
Severity: Release blocker Keywords: accessibility, screen reader, translations
Cc: Sarah Abderemane Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description (last modified by Thibaud Colas)

Follow-up to PR #15843 / ticket #33690 – there are two issues with the theme switcher for screen reader users:

  • The label isn’t translated
  • The label doesn’t convey the button’s current state (light, dark, auto)
  • (potential issue – the SVG elements should be hidden from screen reader users if they don’t have alternative text)

This is important for partly-sighted screen reader users, who will expect the visual appearance of the button and its screen reader announcement to both convey the current state. Particularly between the user’s "auto" system theme and a forced theme.

Here is the current accessibility tree representation (Google Chrome) as a reference:

button "Toggle Light / Dark / Auto color theme"
  StaticText "Toggle Light / Dark / Auto color theme"
  img ""
    Ignored

Change History (2)

comment:1 by Florian Perucki, 2 years ago

Owner: changed from nobody to Florian Perucki
Status: newassigned

comment:2 by Thibaud Colas, 2 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top