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

fix(radio): properly announce radios on screen readers #22507

Merged
merged 88 commits into from Nov 24, 2020

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Nov 16, 2020

Dev build 5.6.0-dev.202011201652.bd13525

Forked from: #22494

Test this at http://localhost:3333/src/components/radio/test/a11y

This PR resolves issues with radio & radio group being announced incorrectly by screen readers.

Axe issues:

  • ARIA toggle fields have an accessible name (ion-radio)
  • ARIA attributes must conform to valid values (ion-radio-group)
  • Buttons must have discernible text (ion-radio)
  • id attribute value must be unique (ion-radio)
Screenreader Browser Native Ionic
macOS VoiceOver Chrome Huey, selected, radio button, 1 of 3 Huey, selected, radio button, 1 of 3
macOS VoiceOver Safari Huey, selected, radio button, 1 of 3 Huey, selected, radio button, 1 of 3
iOS VoiceOver Safari Huey, radio button, checked, 1 of 3 Huey, radio button, checked, 1 of 3
NVDA Chrome Huey radio button checked 1 of 3 Huey radio button checked 1 of 3
NVDA Edge Huey radio button checked 1 of 3 Huey radio button checked 1 of 3
Android Talkback Chrome checked Huey radio button checked Huey radio button

Issues:

  • When clicking to check on a radio button in NVDA it will say:
    Dewey radio button not checked 2 of 3
    checked  
    

brandyscarney and others added 30 commits October 19, 2020 15:58
- don't announce checkbox as being inside of another checkbox
- properly announce when checked
- expand footprint so the selected box surrounds the label too
@github-actions github-actions bot added the package: core @ionic/core package label Nov 16, 2020
@liamdebeasi
Copy link
Member

liamdebeasi commented Nov 20, 2020

Here are the results of my radio test:

  native ion-radio ion-radio list header ion-radio custom label
VoiceOver macOS - Safari Huey, selected, radio button, 1 of 3 Huey, selected, radio button, 1 of 3 Huey, selected, radio button, 1 of 3 Huey, selected, radio button, 1 of 3
VoiceOver iOS Huey, radio button, checked, 1 of 3 Huey, radio button, checked, 1 of 3 Huey, radio button, checked, 1 of 3 Huey, radio button, checked, 1 of 3
Android TalkBack checked, Huey, radio button checked, Huey, radio button checked, Huey, radio button checked, Huey, radio button
Windows NVDA Huey, radio button, checked, 1 of 4 Huey, radio button, checked, 1 of 3 Huey, radio button, checked, 1 of 3 Huey, radio button, checked, 1 of 1

@liamdebeasi
Copy link
Member

liamdebeasi commented Nov 20, 2020

Here are the results of my select test:

Select

native ion-select default ion-select custom label ion-select popover ion-select action sheet
VoiceOver macOS - Safari Dog, choose a pet, collapsed, button, main Dog, choose a pet, listbox popup, button Dog, choose a pet, listbox popup, button Dog, choose a pet, listbox popup, button Dog, choose a pet, listbox popup, button
VoiceOver iOS Choose a pet, dog, popup button Dog, choose a pet, popup button, listbox popup Dog, choose a pet, popup button, listbox popup Dog, choose a pet, popup button, listbox popup Dog, choose a pet, popup button, and main listbox popup
Android TalkBack Collapsed, dog, popup button, choose a pet Dog, choose a pet, popup button Dog, choose a pet, popup button Dog, choose a pet, popup button Dog, choose a pet, popup button
Windows NVDA Choose a pet, combobox, dog, collapsed Dog, choose a pet, menu button, collapsed, subMenu Dog, choose a pet, menu button, collapsed, subMenu Dog, choose a pet, menu button, collapsed, subMenu Dog, choose a pet, menu button, collapsed, subMenu

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
@brandyscarney brandyscarney merged commit afcc46e into master Nov 24, 2020
@brandyscarney brandyscarney deleted the fix-radio-nvda branch November 24, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants