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

Create a custom VoiceOver Rotor to navigate MKAnnotationViews?

I plot several MKAnnotations on an MKMapView. I'd like VoiceOver users to be able to continue panning/zooming a map as they normally would, but I'd also like them to to be able to quickly and easily navigate through my MKAnnotations if they choose.…
djibouti33
  • 12,102
  • 9
  • 83
  • 116
3
votes
1 answer

Reliably retrieve MKAnnotationView for MKAnnotation

I can get an annotationView from an MKMapView by simply passing it an annotation: view(for annotation: MKAnnotation) -> MKAnnotationView? That returns an optional, because if an annotation is offscreen, it might not have an associated…
djibouti33
  • 12,102
  • 9
  • 83
  • 116
3
votes
0 answers

How can I disable automatic scrolling of UITableView when swiping with VoiceOver?

I have a tableview with each cell containing a collectionView (scrolling disabled). When swiping left or right with VoiceOver, the focus moves in unexpected ways. I want to prevent VoiceOver from scrolling the tableview so I can implement custom…
3
votes
2 answers

How to css target "Tab" state of the input?

I believe for accessibility cases, tab is used to navigate through different elements on the page, usually there is a dotted element around Tabbed element to indicate that it is in focus, I tried researching this, but didn't found a reference to a…
Ilja
  • 44,142
  • 92
  • 275
  • 498
3
votes
2 answers

accessibilityLabel of UIViewController's title?

Is there anyway to set an accessibilityLabel for the title of UIViewController? The title of view controller is a string, and I'm sure for the title there should be a label somewhere, just how do I access it? Could one of the navigation items be the…
3
votes
2 answers

How to use tap gesture in Accessibility in swift?

I'm working on app for blind people first i needed to use swipe gesture and after search i can do it by using override func accessibilityScroll( direction: UIAccessibilityScrollDirection)-> Bool { if direction ==…
3
votes
2 answers

Forcing Voiceover to read particular word (homographs)

I want to use the word "live" (l-eye-v) for an event on now rather than "live" (l-i-v) as in "will she live". Is there any way to force this? The answers to VoiceOver accessibility label for Touch ID are fairly relevant to this question and suggest…
Joseph Lord
  • 6,446
  • 1
  • 28
  • 32
3
votes
1 answer

UIImageView not being read by Voice Over

I've got a set of UIImageViews contained inside of a UIScrollView. For some reason, when I go to have Voice Over read all the elements on the page, it does not read the ImageView like it should. I set up the UIImageView's accessibility info like…
Bill L
  • 2,576
  • 4
  • 28
  • 55
3
votes
1 answer

Return to main menu on Long press of a Switch Access button

I am creating a game specifically designed to be played using Switch access. The game builds a grid of buttons dynamically based on the level to mimic the grid layout of an iPad's icons. With the nature of switch access I cannot have a back button…
arhkfp
  • 31
  • 2
3
votes
1 answer

Making dynamically updating content in a UITableView accessible for VoiceOver

I'm trying to make my app more accessible and so far the standard accessibility things like labels and hints are doing wonders. I'm hitting a problem however with dynamically updating content that's displayed in a UITableView. Each row of the table…
jimbobuk
  • 1,211
  • 12
  • 25
3
votes
3 answers

Announce text using AVSpeechSynthesizer after VoiceOver stops speaking text

I need to announce some text to all users of my application when they perform some action. To do so I use AVSpeechSynthesizer. This works well, unless you use VoiceOver to perform the action. Because VoiceOver is announcing some system provided…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
3
votes
3 answers

KIF cannot tap UIButton inside UITableViewCell if it's its UITableView's only one

I am having trouble automating tapping on an UIButton that is embedded inside a UITableViewCell if that cell is the table's only one. This is in the context of UI automation with KIF. Here my relavant call: [tester tapViewWithAccessibilityLabel:…
Drux
  • 11,992
  • 13
  • 66
  • 116
3
votes
2 answers

How to add accessibilitylabel for UISearchBar IOS

self.searchbar.isAccessibilityElement=YES; self.searchbar.accessibilityLabel=@"searchbar"; self.searchbar.accessibilityHint=@"searchbar"; self.searchbar.accessibilityElementsHidden=NO; The above code i have added for a UISearchbar outlet in…
Suraj K Thomas
  • 5,773
  • 4
  • 52
  • 64
3
votes
1 answer

How to fix UITableView Accessibility speak in wrong languge while scrolling?

I'm creating an app in Polish (Polish is set in iPhone settings). All VoiceOver text are said in Polish (like button, numbers etc.). But when I scroll UITableView with three fingers it say in English: "Rows 1 to 10 of 16" (1, 10 and 16 in…
Radek Wilczak
  • 299
  • 5
  • 14
3
votes
2 answers

UIAccessibilityContainer in child view controllers?

I have a parent UIViewController to which I add four child view controllers. I’m trying to manage accessibility throughout those controllers. I have a status enum which keeps track of which of those children are visible on-screen, so when that…
Luke
  • 9,512
  • 15
  • 82
  • 146