A11y Lablearn by doing
0/20

Keyboard and color · 20

Survive forced colors

Gradients and shadows can disappear in a forced-color palette, taking icons and boundaries with them.

What to do

  1. Add an @media (forced-colors: active) repair for the button and icon.
  2. Use system colors and a real visible border; do not disable forced-color adjustment.
  3. Remove the icon background image in forced colors and reveal a system-colored fallback.
/index.html
Preview
updating…

Result

Run the checks

Edit the HTML and select “Check solution”. The preview updates automatically.

If you are stuck

Use ButtonFace and ButtonText. Replace the gradient with background-image: none and let the existing glyph carry the icon.

Read the exact rule or pattern

Exercise 20 of 20

axe-core

Automated audit