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

How to check if Button Shapes is enabled?

How do I check, using UIAccessibility, if the Button Shapes option in the iOS device accessibility settings is enabled? I want to support that 'button style' on a custom made button.
Zandor Smith
  • 558
  • 6
  • 25
2
votes
2 answers

How to programmatically set accessibilityLabel on UILabel?

I am attempting to programmatically set the accessibility label and value for a UILabel (the one titled 'Mega Title!') in my UIViewController. Here's my viewDidLoad... - (void)viewDidLoad { [super viewDidLoad]; // seems you can only set…
C Shreve
  • 121
  • 1
  • 2
2
votes
0 answers

UIButton touch up inside not calling IBAction on some devices

I have a 1x1 point UIButton that I'm using like a skip link for accessibility purposes. When VoiceOver is on and the user douple tap on the button to do some action, the associated IBAction is not called. This only happens on iPad 10.5" (I have not…
matchifang
  • 5,190
  • 12
  • 47
  • 76
2
votes
2 answers

How to make VoiceOver read out a different text than what's in the UITextView?

I have a UITextView containing a text that is meant for sighted users. I want to add a different non-sighted user-friendly text that will be read-out when VoiceOver is on. I tried adding it as an accessibilityLabel, but VoiceOver read both text. How…
matchifang
  • 5,190
  • 12
  • 47
  • 76
2
votes
1 answer

Is there any way to access the Touch Accommodations status programmatically in an iOS app?

iOS has an Accessibility settings group for Touch Accommodations. I'm trying to read whether or not Touch Accommodations is enabled for the iPad from within my running app, programmatically. For example, in Swift, you can access the "Assistive…
Brenbert01
  • 21
  • 1
2
votes
1 answer

NVDA screen reader reading heading twice when embedded with link

I am facing a issue in NVDA screen reader. Its is reading the heading twice. Below is the HTML structure.
2
votes
1 answer

VoiceOver Z gesture won't trigger when UIAlertController is active

I'm trying to use the Z gesture to dismiss a UIAlertController. I have a very simple app. It has a single view with 1 button. Tapping the button presents an alert. I have implemented - (BOOL)accessibilityPerformEscape { NSLog(@"Z gesture"); …
SeanT
  • 1,741
  • 1
  • 16
  • 24
2
votes
0 answers

Accessibility: Related Content - Two fingers flick

I have been trying to understand the intent and potential use case to use "Two finger flick right" as explained under Voice over help section on Apple TV. So far my understanding is Two finger flick right allows voice over to focus on something…
Rahul Sharma
  • 3,013
  • 1
  • 20
  • 47
2
votes
1 answer

Views outside superview bounds are inaccessible to VoiceOver when panning around

In my app, I have some controls that are subviews of a UIView but their frames are outside the superview bounds. They are visible to sighted users because clipsToBounds is false. For VoiceOver users, they can highlight a control that is within its…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
2
votes
1 answer

NSAttributedKey UIAccessibilitySpeechAttributeQueueAnnouncement

I would liked to post a queued announcement I tried using UIAccessibilitySpeechAttributeQueueAnnouncement but I have trouble converting it into an NSAttributedStringKey Code: let queueAnnouncementKey = NSAttributedStringKey(rawValue:…
user1046037
  • 16,755
  • 12
  • 92
  • 138
2
votes
0 answers

adjust accessibility content for UIDatePicker

Is it possible adjust Accessibility content for UIDatePicker? by default(when I tap on hours' wheel) we can hear: "2 o'clock. Picker item. Adjustable. Swipe up or down with one finger to adjust the value.” I need to change this text.
Vit
  • 936
  • 1
  • 10
  • 20
2
votes
3 answers

Not getting right coordinates for UIAccessibilityElement

I'm trying to do grouping of my button with my label but not getting the rectangle for accessibility at right place. After swiping all the way to get to the element, it takes right width and height but y-position is completely wrong. It speaks the…
Arun Kumar
  • 471
  • 1
  • 4
  • 14
2
votes
0 answers

XCUITest - Setting accessibilityFrame of button makes the button not hittable and not enabled

Anyone see this before? I'm setting the accessibilityFrame for a particular button. Along with that, I'm making sure that it is an accessibilityElement. When I debug, self.linkButton is totally unaccessible. It is visible but it is not hittable…
2
votes
2 answers

Finding an element in UI Test with only substring Xcode

I have a web view in my app that I use for account creation (I didi not write and cannot change the associated web pages). Normally, it is easy to click on any button/link but here the string of my "Create Account" button has an font awesome in its…
standousset
  • 1,092
  • 1
  • 10
  • 25
2
votes
0 answers

How to ignore iOS Accessibility setting for Invert Colors in versions earlier than iOS 11.0?

In the Accessibility settings on iOS there is the ability to Invert Colors. However, inverting colors on images and videos isn't always desirable. iOS 11 introduces a property called accessibilityIgnoresInvertColors that can be set on UIViews to…
H K
  • 1,215
  • 2
  • 16
  • 29