Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkbox used as expandable control #291

Open
Heydon opened this issue Nov 23, 2017 · 0 comments
Open

Checkbox used as expandable control #291

Heydon opened this issue Nov 23, 2017 · 0 comments

Comments

@Heydon
Copy link

Heydon commented Nov 23, 2017

To reproduce

  1. Go to https://www.smashingmagazine.com/membership/signup/member
  2. Running a screen reader, such as VoiceOver, focus the "Ah what is CVV again?" control
  3. It is identified as a checkbox

This was reported by a screen reader to me as being confusing, because there is no indication that the checkbox is for opening an expandable section.

To fix

Make the checkbox control a button and toggle its expanded state. This will prompt screen readers to say "Ah what is CVV again? Toggle button, collapsed" (unexpanded state) and "Ah what is CVV again? Toggle button, expanded" (expanded state).

Unexpanded state

<button aria-expanded="false">Ah what is CVV again?</button>

Expanded state

<button aria-expanded="true">Ah what is CVV again?</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant