LowWCAG 1.4.11 · Level AAPerceivable
Dark/Light Theme Toggle State
Audits theme switcher controls for proper aria-pressed state attributes and theme contrast.
Rule ID: custom-theme-persistence · reported under Needs review, because a person should confirm it.
Who this affects
Low-vision people cannot see buttons, inputs and icons that do not stand out from the background.
WCAG 1.4.11 Non-text Contrast: read the W3C explanation of Non-text Contrast
How to fix it
Problem
<button onclick="toggleTheme()">Theme</button>Fixed
<button aria-pressed="true" aria-label="Toggle dark theme" onclick="toggleTheme()">Theme</button>These are short examples. In the extension, A11yEngine points to the element on your own page and can suggest a fix for your code (HTML, React, Vue or Tailwind).
Find this on your own pages
Check any page for this and 100+ other issues in your browser, free.