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

didSelectRowAtIndexpath not called when voice over is on

I'm having a custom UITableViewCell and it contains some labels and imageViews. Now everything works great except when voice over is turned on. The accessibility label is spoken like excepted but when it's not possible to click on the row it just…
user1007522
  • 7,858
  • 17
  • 69
  • 113
2
votes
1 answer

Using XCUIElementQuery to query a button in tableHeaderView not found

I want to using Xcode UI Test to help me automation testing my app. My view hierarchy like: UITableView->TableHeaderView->My custom view->Setting button. I want to query my button with accessibilityIdentifier, I set it in my viewController, and…
Marcus Wu
  • 47
  • 7
2
votes
2 answers

accessibilityPerformEscape does not dismiss UIAlertController

I'm trying to show a UIAlertContoller and dismiss it when VoiceOver user performs a scrub gesture: override func accessibilityPerformMagicTap() -> Bool { showPopup() return true } override func accessibilityPerformEscape()…
Maysam
  • 7,246
  • 13
  • 68
  • 106
2
votes
1 answer

Adding Accessibility to piano style UI element

I'm trying to make a musical keyboard UI element accessible. Just like how GarageBand does it. In other words, at first touch user is told by VoiceOver that they are touching a musical keyboard, and from that point every tap on musical keyboard view…
Nikolozi
  • 2,212
  • 2
  • 19
  • 29
2
votes
1 answer

Not able to open the NSURL inside the UITextView (Attributed text) when Accessibility is ON

I am not able to open the NSURL inside the UITextView with Accessibility turned ON.(Working fine when turned OFF) I have attributed text inside the UITextView that contains some string and some NSURLs. Please note I have used attributed string as I…
Nipun Arora
  • 372
  • 1
  • 10
2
votes
0 answers

Will Microsoft UI Automation be ported to Windows 10 Mobile?

We are looking to develop Accessibility Apps for windows 10 mobile, but have noticed a distinct lack of hooks to be able to trigger help for users requiring Accessibility enhancements. Something like UI Automation for desktop windows, that can run…
2
votes
1 answer

VoiceOver reads Label even when button is double-tapped

I have set up the customized Hint for my UIButton. What I expect is that when single-tapped, the button will read the Hint; when double-tapped the Hint will not sound, but the normal button action will happen. But in fact, the Hint is read again on…
Andrew Duncan
  • 3,553
  • 4
  • 28
  • 55
2
votes
2 answers

How to set VoiceOver initial focus on a UITableView

In our iOS app, we have a screen with a UINavigationController, three UIBarButtonItem in the rightBarButtonItems, a UIView content view with a UITableView subview. Every time the app gets to the foreground, VoiceOver places the initial focus on the…
Nicolai Henriksen
  • 1,324
  • 1
  • 13
  • 37
2
votes
1 answer

incorrect order of Accessibility in UICollectionView

So I have a UICollectionView in a UIViewController which is one of the root view controllers in the tab bar. I set a contentInset for the UICollectionView so I can Add a Label to the top of the collectionView, at which point it would mean that the…
Shabarinath Pabba
  • 1,359
  • 2
  • 13
  • 22
2
votes
2 answers

How can you reorder the way VoiceOver reads UIAccessibilityElements?

There are 2 answers on SO concerning this, but neither seem to work any longer. I have a custom UITableViewCell. There are various labels laid out on this cell. VoiceOver for Accessibility reads things Left to Right, Top to Bottom. This is an issue…
chris P
  • 6,359
  • 11
  • 40
  • 84
2
votes
1 answer

iOS 9.1 Crashes App when Accessibility Inspector is On

I am using HockeyApp for crash reporting. I noticed a crash that is happening frequently and only with iOS 9.1. The crash occurs when a text field becomes the first responder which also triggers a UITableView delegate to be set. At first I…
jherg
  • 1,696
  • 2
  • 13
  • 15
2
votes
1 answer

UIButton voice assistance on demand with VoiceOver enabled

I would like to ask how to design voice over assistance on demand with VoiceOver enabled. I have such code to create UIButton: _myLocationButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [_myLocationButton setImage:[UIImage…
Marcin Kapusta
  • 5,076
  • 3
  • 38
  • 55
2
votes
1 answer

Apple Watch v1.01 Voice Over Accessibility of WKInterfaceTable rows doesn't work

I'm trying to get some simple Voice Over setup working on my Watch app. I use a WKInterfaceTable who's rows have multiple elements within them. At the moment voice over just goes over each individual element reading them out. I want to set that each…
jimbobuk
  • 1,211
  • 12
  • 25
2
votes
1 answer

Three-Finger UIPanGestureRecognizer doesn't work when Accessibility -> Zoom is on in "Settings App"

So, I have this code which basically creates a UIPanGestureRecognizer and adds it to the view. In the target method I am just printing the number of touches. It works fine under normal circumstance; and print correct number of touches. But if…
PanxShaz
  • 760
  • 9
  • 12
2
votes
1 answer

Can you implement Accessibility methods inside UIViewController class?

I implement the Accessibility delegate methods inside a UIViewController subclass and I put a breakpoint in these delegate methods, but it never hits the breakpoint. What is the reason for this? Please let me know if anyone has an idea about this.
Shabarinath Pabba
  • 1,359
  • 2
  • 13
  • 22