Opened 2 years ago

Closed 2 years ago

#34033 closed Bug (fixed)

Admin light/dark theme switch needs to convey its state for screen reader users

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 (7)

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)

comment:3 by Florian Perucki, 2 years ago

Has patch: set

comment:5 by Mariusz Felisiak, 2 years ago

Cc: Sarah Abderemane added
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

Thanks for the report. Bug in bc7aa2a5e91cf65fc7510edaf1776528c7ad07b4.

comment:6 by Mariusz Felisiak, 2 years ago

Triage Stage: AcceptedReady for checkin

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In 2c7c22f9:

Fixed #34033 -- Improved accessibility of switch button for dark mode in the admin.

Bug in bc7aa2a5e91cf65fc7510edaf1776528c7ad07b4.

Thanks Thibaud Colas for the report and review.

Note: See TracTickets for help on using tickets.
Back to Top