Questions tagged [uiaccessibility]

UIAccessibility is an informal protocol in UIKit that provides accessibility information about user interface elements. This information is used by VoiceOver and other assistive technologies to help users with disabilities interact with your application. All of the standard views and controls in UIKit implement UIAccessibility, so applications are accessible by default.

This tag is for any questions about making iOS apps more accessible to users via the UIAccessibility protocols.

By default, all objects that inherit from UIView adhere to this informal protocol. In fact, for many views with a low level of customization, iOS is clever enough to set the accessibility attributes automatically. For higher levels of customization, though, the following fields can be set manually (from the Apple docs):

  • Label. A short, localized word or phrase that succinctly describes the control or view, but does not identify the element’s type. Examples are “Add” or “Play.”
  • Traits. A combination of one or more individual traits, each of which describes a single aspect of an element’s state, behavior, or usage. For example, an element that behaves like a keyboard key and that is currently selected can be characterized by the combination of the Keyboard Key and Selected traits.
  • Hint. A brief, localized phrase that describes the results of an action on an element. Examples are “Adds a title” or “Opens the shopping list.”
  • Frame. The frame of the element in screen coordinates, which is given by the CGRect structure that specifies an element’s screen location and size.
  • Value. The current value of an element, when the value is not represented by the label. For example, the label for a slider might be “Speed,” but its current value might be “50%.”

When a VoiceOver user taps a view (or a Switch Control user scans over it), that view's properties are read out loud. These properties also help to determine how VoiceOver and Switch Control facilitate user interaction.

For more information, See the official Apple documentation here: Accessibility Programming Guide

546 questions
6
votes
2 answers

Hide UITableViewCell from VoiceOver

I have a static UITableView with various cells in it. I need to hide/show some of those cells, so I've implemented heightForRowAtIndexPath and return 0 when appropriate in order to hide the right cells. This works great for sighted users, but for…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
6
votes
2 answers

UIAccessibilityAnnouncementNotification VoiceOver Interruption

I'm having a great deal of trouble with iOS 7/8 UIAccessibility. The specific use case I am working with is what I would expect to be a pretty common "progress saved" use case. EDIT: It has been brought to my attention that the desired outcome was…
dave
  • 1,150
  • 1
  • 13
  • 22
6
votes
3 answers

How to disable accessibility for custom static UITableViewCell

I have a storyboard containing a UITableViewController with static content. The cells are very simple, containing just a single UILabel. If I now want to disable accessibility on one of the cells, I simply uncheck the mark on the label. This works…
Alfonso
  • 8,386
  • 1
  • 43
  • 63
6
votes
3 answers

Localized String with Interface Builder User Defined Runtime Attributes

I am currently trying to create a localized accessibilityLabel in the storyboard (I am trying to avoid doing it programatically). It seems that whenever I use the Localized String option, the accessibilityLabels ends up being set to the localized…
6
votes
2 answers

Accessible Custom Keyboard in iOS

I want to make a custom keyboard perform like the iOS software keyboard with regards to accessibility. When a button-press adds a letter to a UITextField, the letter should be spoken by VoiceOver in the ‘added character tone‘. When a button-press…
6
votes
2 answers

UIAccessibility change UITableView voiceover announcements (row # of #)

With VoiceOver enabled a user can use a 3 finger swipe gesture to scroll TableViews. VoiceOver verbally announces to the user a phrase indicating their location on the tableview i.e. the rows that are visible such as "Rows 1 to 4 of 5". I would…
Des
  • 314
  • 3
  • 9
5
votes
1 answer

IOS UITableView accessibility order is wrong after setting accessibilityElements on UITableViewCell

IOS UITableView accessibility order is wrong after setting accessibilityElements on UITableViewCell I have a large and complicated UITableView with, many different kinds of custom UITableViewCells. If I don't do any special accessibility changes to…
vm2000
  • 332
  • 1
  • 14
5
votes
2 answers

UIAccessibility announcing n of n elements on custom views

When you add a UISegmentedControl to a view, UIAccessibility will focus on it and say: "(Selected) ItemName Button 1 of 2" "ItemName Button 2 of 2" I have a custom control that has UIButtons that toggle similar to a UISegmentedControl. But what I'm…
barrett
  • 327
  • 1
  • 9
5
votes
1 answer

Accessibility Hint is not read out when changing focus

When I programmatically move voiceover focus to a label, the hint of the label is not read out. How can I fix that? Only the accessibility label is read out. UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, self.label)
matchifang
  • 5,190
  • 12
  • 47
  • 76
5
votes
2 answers

ios VoiceOver focus not moving beyond navigation bar

VoiceOver focus not moving beyond navigation items. I am swiping right but focus trapped on the last element of navigation item. Probably it should move to the first element of the ViewController view. I have set accessibilityElements and made each…
5
votes
1 answer

Accessibility with dynamic elements in angular 5

I am working with accessible the website using keyboard and while tab press, Dynamic div(with ngIf)conditions is not working as expected. I do have dynamic element with conditions to display one or other, when i focus on particular div element and…
a.p. patel
  • 103
  • 4
  • 25
5
votes
1 answer

iOS Accessibility in UICollectionView: VoiceOver gets stuck on last cell

I'm trying to get accessibility to work in my app. I want the exact same behavior as the "App Store" app, in the "Featured" page: A tableview where each row contains a collectionView with some cells. I want to use VoiceOver to go thru all of the…
Shaked Sayag
  • 5,712
  • 2
  • 31
  • 38
5
votes
1 answer

Multiple live regions and accessibility

I have a page where more than one part of the page changes upon user input. If I user role="alert" on all of them, only one of them is read out by Jaws/Narrator. Is this expected? What is the workaround?
Gopal
  • 1,292
  • 3
  • 19
  • 41
5
votes
0 answers

UIImageView has wrong frame when bold text enabled in accessibility

I have an UIImageView which trailing edge is anchored to other view's leading edge. However when I enable bold text in accessibility settings on iPhone, the image view's size is 1pt larger which makes image render in a wrong position. Is it UIKit…
pronebird
  • 12,068
  • 5
  • 54
  • 82
5
votes
2 answers

UIAccessibilityFocus protocol not working

I want to know when a user shifts the focus away from an accessibility element. I have tried overriding the accessibilityElementDidLoseFocus() and accessibilityElementDidBecomeFocused() methods but the methods doesn't seem to be called upon when I…
Cherie CH.
  • 171
  • 2
  • 8