WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Controls on iOS Native App

for

From: Joe Humbert A11y (Android)
Date: Nov 2, 2022 5:30AM


Hi Allyssa,


I'm not sure which elements you are talking about so I might need a reply
to provide better guidance.


However, iOS does not have a native checkbox element. Any element you see
that visually looks like a checkbox is just that, a clickable element that
looks like a checkbox. If Voiceover announces a selected state when
"checked" then it has been given an accessibilityTrait of selected. It has
no role because there is no checkbox role in iOS. In my opinion the
developer should add an accessibilityTrait of button. Or better yet, use a
native switch.


As for the toggle button, I'm not sure what you mean. As it could be a lot
of different elements. But similar to the checkbox, there is no native iOS
right button element. So the developer is again using the
accessibilityTrait of selected when it is toggled. This element should
also have an accessibilityTrait of button.


To my Current knowledge, and I'm happy to be corrected, Apple VoiceOver
developers consciously decided to not have most elements announce an
"unselected", "unchecked" state. The exception might be a switch which has
states if off/on.


Hope this helps.

Thankx,
Joe Humbert
Mobile accessibility novice

On November 2, 2022 7:06:30 AM allyssa jessicon < <EMAIL REMOVED> >
wrote:

> Hello everyone,
>
> Good morning!
>
> "Straight up to the question.
>
> What's the exp]ected behaviour of checkbox and toggle buttons in
> native mobile applications in iOS?
>
> It seems that only the selected state is getting announced by
> VoiceOver, for an example if I navigate to the VoiceOver rotor
> settings, its announcing as Selected (without role) and if I uncheck
> the same, VoiceOver does not announce anything.
>
> Is this an expected behavior? or are there something that I am missing?"
>
>
> Regards,
> Allyssa.
> > > >