A11y Lablearn by doing
0/20

Hiding · 11

Keep a custom checkbox touchable

A custom visual checkbox still needs a full-size native input for touch screen-reader exploration.

What to do

  1. Keep the native checkbox named and present in the accessibility tree.
  2. Make it fully cover the 32×32 visual control.
  3. Use opacity: 0—not display: none—and preserve pointer interaction.
/index.html
Preview
updating…

Result

Run the checks

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

If you are stuck

Stretch the native input over the custom square, then make it transparent. Manually verify drag-to-explore and double-tap with VoiceOver or TalkBack.

Read the exact rule or pattern

Exercise 11 of 20

axe-core

Automated audit