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

Is there a way to customise Accessibility label on the navigation bar back button?

I am trying to find a way to customise the accessibility label for the back button on the navigation bar for voiceover feature. I know the accessibilityLabel feature is used to customise the elements, however I can't seem to be able to do it for the…
Cherie CH.
  • 171
  • 2
  • 8
5
votes
2 answers

Accessibility (Voice Over) with Sprite Kit

I'm attempting to add support for Voice Over accessibility in a puzzle game which has a fixed board. However, I'm having trouble getting UIAccessibilityElements to show up. Right now I'm overriding accessibilityElementAtIndex,…
Mason
  • 271
  • 2
  • 12
5
votes
4 answers

CSS focus outline on mobile devices, still necessary for accessibility?

Without a traditional keyboard on mobile devices is the CSS outline focus still necessary? I do understand the importance on desktops but not sure if outline focus state is actually useful on mobiles. Was unable to find research on that. Thank you
Mircea
  • 11,373
  • 26
  • 64
  • 95
5
votes
0 answers

How to specify accessibility attribute values for the menu item when using a custom view?

I am writing a custom NSMenuItem view that I would like to make accessible. When I do not override accessibilityIsIgnored (so the NSView default of YES is returned), I see in Accessibility Inspector that there is a basic AXMenuItem object in the…
Daniel Trebbien
  • 38,421
  • 18
  • 121
  • 193
5
votes
3 answers

UIAccessibility default language throughout the app

We're working on an app that's localized only in the German language and want to add accessibility feature to it. Since the accessibilityLabels are in German, it would be great to always read it in German, regardless of what the user's default…
zavié
  • 4,301
  • 2
  • 34
  • 46
5
votes
1 answer

Standard UIButton isAccessibilityElement returns NO by default

Drag a standard button onto a view in IB and then log its isAccessibilityElement property. This returns NO, even though the documentation clearly states that it should be set to YES by default. Am I missing something?
josef
  • 867
  • 12
  • 28
5
votes
1 answer

Custom UIView Not Showing Accessibility on Voice Over

I'm trying to get voice over working with an openGL view, specifically from the cocos2d framework. From the Apple Accessibility guide I followed this section: Make the Contents of Custom Container Views Accessible I've subclassed the view (CCGLView…
tassinari
  • 2,313
  • 2
  • 24
  • 32
4
votes
1 answer

Swift: @available up to specific iOS version but not higher

Problem: I'd like to use accessibilityIdentifier() in SwiftUI on iOS 14, but some of the code supports iOS 13+. Can I keep using the same API as the iOS 14+ version which will do nothing on iOS 13? e.g.: /// How to make this available on pre-iOS 14…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
4
votes
0 answers

iOS- UIAccessibility focus random table view cell on reloading the table view

I have a UITableview, whenever I reload the table view, accessibility focus goes to random cell. I tried to post the notification as below to move the focus to specific cell let indexPath = IndexPath.init(row: 0, section: 0) let desiredCell =…
jailani
  • 2,260
  • 2
  • 21
  • 45
4
votes
1 answer

Accessibility identifier for UI subviews based on parent view id

I have a custom view that has some subviews like labels and text fields. When I use multiple custom views into one controller I want to know the subview Accessibility Identifier. What I want to achieve is that set parent…
Retro
  • 3,985
  • 2
  • 17
  • 41
4
votes
1 answer

Can I declare app-wide acronym substitution for voice-over?

Being a data-centric app, I have lots of german legal acronyms for german laws in my app. An english example would probably be "Cx" being read as "Constitution". I have a handful of those acronyms, they can be found in various text fields, all…
bjrne
  • 355
  • 5
  • 14
4
votes
0 answers

Accessibility issue when presenting UIViewController with style overCurrentContext

When I present UIViewController with style overCurrentContext. Voice Over is reading content from previous view controller when swipe right after reaching the last element of current ViewController. It's working fine for iOS 13 and above. Problem is…
4
votes
1 answer

App crashed with [WAKScrollView canBecomeFocused]: unrecognized selector sent to instance

The app is crashing on iOS 13 versions only with crash details fetched from Firebase Crashlytics. There are no specific details about the app location where the app is crashing. I have tried finding out about it, but not succeeded. Fatal Exception:…
4
votes
2 answers

iOS 13 Voiceover issue, rotor action not working with embedded links

We have implemented the voiceover functionality in our app for the custom alert view which contains the UITextView. This UITextView has the links and we have also added the correct LinkAttributes for the links. in iOS 12 its working fine, using…
aniket.ghode
  • 86
  • 1
  • 9
4
votes
2 answers

UIImageView not seen by Accessibility Inspector after setting hidden to false when contained in a UITableViewCell

In our application we display a list of items and each item has an image which can either be hidden or displayed. The issue is that if the image is initially hidden, when we set hidden = false, the image is displayed but the Accessibility Inspector…
Cosmin
  • 2,840
  • 5
  • 32
  • 50