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

How to bind dynamic data to aria-label?

I have dynamic text to bind to aria-label on a HTML page. This is an Angular 2 app. I am using something like this: aria-label="Product details for {{productDetails?.ProductName}}" But I get an error: Can't bind to 'aria-label' since it isn't a…
namrata
  • 2,235
  • 5
  • 28
  • 35
74
votes
4 answers

iOS Voiceover status

I am trying to add accessibility features to an iOS app that has already been developed. There are a couple of UI features (e.g. buttons) that I like them to show up if the VoiceOver option in the accessibility menu of the iPhone settings is on and…
Arash
  • 1,286
  • 1
  • 8
  • 14
55
votes
4 answers

What's the difference between setAccessibilityLabel and accessibilityIdentifier in ios?

I've been going through our code base and setting the accessibilityIdentifier property on all of our buttons and text fields so that I can access them using UIAutomation. While doing this, I came across some code that was already in…
Tyler Pfaff
  • 4,900
  • 9
  • 47
  • 62
46
votes
2 answers

Actual difference between UIAccessibilityLayoutChangedNotification and UIAccessibilityScreenChangedNotification?

I’m trying to ascertain what exactly happens differently when posting a UIAccessibilityLayoutChangedNotification, and a UIAccessibilityScreenChangedNotification. From what I can see, I can use them interchangeably everywhere and nothing different…
Luke
  • 9,512
  • 15
  • 82
  • 146
20
votes
6 answers

Why is UIAccessibility.post(notification: .announcement, argument: "arg") not announced in voice over?

When using Voice Over in iOS, calling UIAccessibility.post(notification:argument:) to announce a field error doesn't actually announce the error. I have a submit button and, when focusing the button, voice over reads the button title as you would…
brandenesmith
  • 356
  • 1
  • 2
  • 8
17
votes
1 answer

How to set the Accessible Name associated with a TEdit control?

If a user is using a screen reader (e.g. Microsoft Narrator), and their focus enters a text box: All they hear is: Editing text Meanwhile in accessible applications, such as Microsoft File Explorer Microsoft Word Microsoft Excel Microsoft…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
16
votes
4 answers

How can I queue multiple accessibility notifications for VoiceOver?

This is how I'm notifying the system to read out my elements: UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, cell) The problem is that when I send multiple notifications, the one that is already reading gets interrupted! I…
P. Sami
  • 2,115
  • 2
  • 21
  • 39
15
votes
3 answers

DIV ARIA-LABEl not being read by JAWS

I have an angular2 application and I am binding some dynamic text to ARIA-LABEl for a nested DIV. But when I use the JAWS reader to locate DIVs on the page , it is not reading the assigned text.This is the text I am trying to read -…
namrata
  • 2,235
  • 5
  • 28
  • 35
15
votes
1 answer

How to add VoiceOver accessibility to an App's Icon Badge Number?

Question: How do I add a custom VoiceOver accessibility Label or Hint to an App Icon Badge Number?                       For example, when the iOS Setting Accessibility > VoiceOver is turned On, VoiceOver reads aloud items touched on screen.…
user4806509
  • 2,925
  • 5
  • 37
  • 72
15
votes
4 answers

voice over can only see a page of a uicollectionview

So i have a UICollectionView with a set of UICollectionViewCells displayed using a custom UILayout. I've configured the UILayout to lay out all the UICollectionViewCells almost exactly the same as how they are laid out in the photos app on ios. The…
stephen
  • 1,617
  • 3
  • 20
  • 27
13
votes
3 answers

VoiceOver parent and child views as accessibility elements

I have a simple UIView hierarchy. There is a parent view A which contains view B and C. If I set all views as accessibility element, only view A is accessible. Views B and C are not clickable. I need all views (A, B and C) to be accessibility…
pawel221
  • 977
  • 1
  • 7
  • 9
13
votes
2 answers

Is there any way to have VoiceOver read a label on command?

I'd like to have my QR code scanning app inform the user when it finds a QR code. For sighted users, this works using a label at the bottom that updates to notify the user. However, a blind user would have to tap on that label again to have it read…
Connor Hargus
  • 317
  • 2
  • 11
13
votes
7 answers

Prevent voice over (Accessibility) from announcing UITableViewCell as selected

When a UITableViewCell is selected, voice over announces "selected", I don't want voice over to say "selected". How can i achieve this ? Things I have tried with no success: Changed the cell accessibilityHint and accessibilityLabel Changed the cell…
user1046037
  • 16,755
  • 12
  • 92
  • 138
12
votes
4 answers

Check if a function is available in Swift?

I would like to detect if the user has enabled Reduce Transparency. It's simple you just call the func UIAccessibilityIsReduceMotionEnabled() and it returns a Bool. But my app targets iOS 7 and 8 and this function isn't available on iOS 7. In…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
11
votes
1 answer

Post accessibility notification in SwiftUI

I need to move the accessibility focus to certain element on the screen. In UIKit, we can simply do UIAccessibility.post(.screenChanged, element) However, when I do that with a SwiftUI View, the app crashes with the following message in console This…
user1366265
  • 1,306
  • 1
  • 17
  • 28
1
2 3
36 37