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
4
votes
2 answers

How do I provide custom accessibility text for ios local notification content - UNNotificationContent

I'm trying to provide custom text for voiceover user instead of reading the body text. E.g., the current body text is say "Apple stock $203.03 ↑" it reads as "Apple stock two hundred three dollars and three cents up arrow" but I wanted to read as…
palaniraja
  • 10,432
  • 5
  • 43
  • 76
4
votes
1 answer

stop voice over from saying the automatic hint for UIAccessibilityTrait adjustable (swift)

When having an element on screen that has the UIAccessibilityTrait .adjustable, Voice Over reads out the automatic hint provided by iOS, saying "swipe up or down with one finger to adjust the value". How do I stop iOS from saying that hint? I want…
WalterBeiter
  • 2,021
  • 3
  • 23
  • 48
4
votes
1 answer

In UIAccessibilityContainer, what's the difference between using `accessibilityElements` and the other three methods?

In iOS 8, Apple introduces var accessibilityElements: [Any]?. func accessibilityElementCount() -> Int func accessibilityElement(at: Int) -> Any? func index(ofAccessibilityElement: Any) -> Int What's the difference between them? Is the priority of…
WildCat
  • 1,961
  • 6
  • 24
  • 35
4
votes
3 answers

Performing UIAccessibilityCustomAction from UITests

I've got a subclass of UIView, let's say it's class DemoView: UIView { } which contains UILabel and UIButton. I needed to group it and add UIAccessibilityCustomAction so I've overriden the var accessibilityElements: [Any]? and used union to connect…
mikro098
  • 2,173
  • 2
  • 32
  • 48
4
votes
1 answer

UIAccessibility - When dismissing another view, set focus to previous accessibility element

I am implementing accessibility into our current project and have some issues on setting focus on an element in a previous viewcontroller. An example would be: A user selects on a tableview cell at index 3. In didSelectRowAt, we present to the user…
BearBearBear
  • 109
  • 3
  • 9
4
votes
1 answer

how to make JAWS screen reader to read the title document to read separately letter by letter instead of sentence?

I am using the title element to update the document title and using JAWS reader to read the page. Facing issue with the way it is reading the title of the document. Below is my code to update the title attribute var _doctit = "MY…
Sasi Dhivya
  • 501
  • 2
  • 7
  • 25
4
votes
1 answer

What are the differences between Accordion pattern and Disclosure pattern?

Apart from keyboard interaction, are there any major differences between Accordion and Disclosure patterns? Why does aria authoring practice have two different topics for logically similar show/hide components?
user 9631883
  • 466
  • 5
  • 14
4
votes
1 answer

What is the difference between aria-errormessage and aria-alert?

I am new to accessibility types. There is confusion as to when to use aria-errormessage and when to use aria-alert. I need to display one of these in an aria-live region. Which should I use and why?
4
votes
1 answer

iOS Voiceover reads from covered UIWindow

I have the following setup: UIWindow 0, windowLevel 0, rootController is the main part of the app, and takes up the whole screen, isHidden is false, is not key window UIWindow 1, windowLevel 1, rootController is an auxiliary screen, and takes up…
robinkunde
  • 1,005
  • 9
  • 12
4
votes
1 answer

UITextInput not announced correctly by VoiceOver

I have a problem with how VoiceOver announces my custom UITextInput while it has the keyboard focus: When the accessibility focus is moved to the UITextInput view by swiping left/right the UITextInput is correctly announced by VoiceOver and I am…
Goderbauer
  • 63
  • 5
4
votes
0 answers

How to disable default Accessibility Action for custom UITableView

I'm using a custom UITableView and when I turn on VoiceOver and Rotor's Actions for each cell there is a message: "Actions available" and one of them is delete, which I don't want to be added. I have read:…
4
votes
1 answer

Is there a way to change text for default accessibility action in VoiceOver in iOS app?

I'm adding some accessibility custom actions for VoiceOver users in my app but by default it says "activate item, default action". By using rotor, VoiceOver users change rotor item to actions then they perform registered custom actions (like delete…
Hiren Prajapati
  • 717
  • 3
  • 10
  • 25
4
votes
1 answer

Unable to configure voice over accessibility for a custom UITableViewCell

Our iPhone app currently supports IOS 8/9/10. I am having difficulty supporting voice over accessibility for a custom UITableViewCell. I have gone through the following SO posts, but none of the suggestions have worked. I want individual components…
Kartik
  • 2,541
  • 2
  • 37
  • 59
4
votes
0 answers

Subclasses of UISearchBar and UISearchController breaks VoiceOver

In my app I have a UIViewController that lets users search in a server database. (It's not filtering an existing list.) Results are displayed in a UITableView, which is the searchResultsController of the custom UISearchController. We need a…
4
votes
1 answer

Swift 2 UI Test For Hidden Element, Trying Hittable

I'm looking for a way to test if an XCUIElement is hidden in Swift 2 XCTestCase UI Tests. It was not working on Xcode 7, so I updated to Xcode 7.1 and it still does not work. I've tried referring to this post with no luck: Testing if an element is…
Alex
  • 3,861
  • 5
  • 28
  • 44