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
3
votes
1 answer

Showing / hiding accessibility elements in an overflow menu when opening a custom UITableViewCell

I’m implementing accessibility in a custom UITableViewCell class. I have a fairly simple overflow menu with a couple of buttons inside it, which are hidden until an ellipsis button is pushed that slides open and closes the overflow. In my cell's…
Luke
  • 9,512
  • 15
  • 82
  • 146
3
votes
1 answer

How to enable the ability to use the two-finger UIAccessibility "escape" gesture on a modal view?

I'm looking to add the capability for a popup view to be dismissed by using the "two-finger-z- gesture, via accessibilityPerformEscape. I've added this code to the view, but I am not able to dismiss it with the z gesture, is there anything else i'm…
3254523
  • 3,016
  • 7
  • 29
  • 43
3
votes
1 answer

iOS 7 + Calabash: UITextView with NSLinkAttributeName and accessibility on links not working

We have a UITextView that contains an attributed string with two embedded links that are created in the text view by using NSLinkAttributeName. We are using Calabash to automate testing and calabash cannot 'tap' on the links inside of these…
dslowin
  • 31
  • 3
3
votes
1 answer

Can I influence what appears in the VoiceOver rotor?

I have a text based app where I want my users to make use of the 'Lines' rotor option when VoiceOver is enabled. However the option doesn't appear. The text in my app is laid out using cells in a tableview (the cells contain UILabels and other…
Mikkel Selsøe
  • 1,171
  • 1
  • 11
  • 23
3
votes
0 answers

Accessibility read order Issue using addChildViewController

I am facing problem with Accessibility read order issue. I have a UIViewController in that 3 UIViewControllers added as childViewControllers. NavigationController is added to the MainViewController. When I turn on the accessibility, VO start reads…
Rakesh iOS Dev
  • 935
  • 12
  • 19
3
votes
1 answer

UIViewController child view controller accessibility

While adding a child view controller, is there a way to hide parent VC elements from the voiceover access? I've a parent view controller P, which adds a child view controller C as a full screen page view controller. Once the transition to the full…
Swapnil Patel
  • 111
  • 1
  • 4
3
votes
1 answer

UIAccessibility Tableview Scrolling Issue

I have implemented Accessibility for a custom table view. Where I enabled the accessibility for all the subview of table cell like imageview,label,button,textfields. I am facing 2 issues after implementing accessibility. Because of the the…
Rakesh iOS Dev
  • 935
  • 12
  • 19
3
votes
1 answer

Dynamic Accessibility Label for CALayer

How do I make a CALayer accessible? Specifically, I want the layer to be able to change its label on the fly, since it can change at any time. The official documentation's sample code does not really allow for this.
Skotch
  • 3,072
  • 2
  • 23
  • 43
3
votes
1 answer

UICollectionView Section Headers as Accessibility Headers

I have two questions regarding accessibility and UICollectionViews that I'm hoping to get some expert help with. The other question, regarding Voice Over read order, is here. I've created a sample project demonstrating both issues. I have a…
Jose Ibanez
  • 3,325
  • 3
  • 28
  • 33
3
votes
1 answer

Custom UITableview cell accessibility not working correctly

I have a class which loads a tableview. In this tableview there are 4 sections with 1 row each. Each section row loads different custom cells. I have disabled the accessibility of the custom cells. But enabled the accessibility for the elements in…
user1905823
  • 51
  • 1
  • 5
3
votes
1 answer

Is there a notification for when a UIView's position in the window changes?

I have a custom UIView which is an accessibility container. Each of the UIAccessibilityElements it houses has a frame, relative to the window. Because the frame is relative to the window, it needs to be updated whenever the position of the view in…
Hilton Campbell
  • 6,065
  • 3
  • 47
  • 79
2
votes
0 answers

Accessibility of autosave fields

I've got a profile screen with a few simple text and radio button fields. I want to avoid submit button but instead autosave the value of the field onblur event. That approach is becoming more and more common but I am wondering how to resolve that…
Malvinka
  • 1,185
  • 1
  • 15
  • 36
2
votes
1 answer

what is the "Drag" and how did it come about?

I have define a custom actions in my accessibilityElement: UIAccessibilityCustomAction *action1 = ...initWithName:@"label1"; UIAccessibilityCustomAction *action2 = ...initWithName:@"label2"; element.accessibilityCustomActions = @[action1,…
sss
  • 21
  • 3
2
votes
0 answers

AXObserverAddNotification fails in Big Sur OSX 11.5

After replacing Big Sur MacOS 11.0 with the latest 11.5 update, my app's AXObserverAddNotification method fails despite providing both observer and element. Below is the ObjC code I use: if (AXObserverCreate(pid, menuOpened, &observer) ==…
Antony
  • 41
  • 4
2
votes
1 answer

Have screen reader pronounce Country codes in a text input as individual letters

I am working on an Angular app that displays selected Country codes in a text field. This input displays Country codes because of space constraints: