Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't UIScrollview have an accessibility area in the Interface Builder?

I've noticed that a UIScrollView doesn't have mentioned accessibility area where I can set accessibility label or accessibility. This seems to apply for activity indicators too.

Why does UIVIews, UIButtons and more have this area and not UIScrollView and UIActivityIndicatorView?

like image 702
MdaG Avatar asked Oct 07 '11 09:10

MdaG


1 Answers

Good question - the reason for a scroll view is that Apple don't consider it to be an accessible element.

If you look at the UIAccessibility documentation, you'll find Apple have the following to say on what counts as an 'accessible element':

The only exception to this [a view being accessible] is a view that merely serves as a container for other items that should be accessible. Such a view should implement the UIAccessibilityContainer protocol and set this property to NO.

A UIScrollView is simply a container for subviews, so its isAccessibilityElement property is set to no (hence why you don't see the accessibility options in interface builder).

So basically, when you're using a scroll view the items inside it should be accessible, but not the scroll view itself.

like image 101
lxt Avatar answered Oct 11 '22 12:10

lxt