Skip to main content
AppleVis

Main navigation

  • Apps
  • Forum
  • Blog
    • Podcast
    • Guides
    • Hardware & Accessory Reviews
    • Bug Tracker
    • Developer Resources
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. App Development and Programming

Accessibility on UIPickerView

By Alex M, 6 May, 2016

Forum
App Development and Programming
Hello, I recently started work on making my app accessible. After I used VoiceOver on it, I realized that it was really lacking in that regard. Now I'd like to do as good a job as I can and make it convenient to use. This is my first foray into accessibility. I found most things easy to do, but stumbled into one issue that I have no idea how to solve, even after hours of googling and trial-and-error. So I have a somewhat customized UIPickerView in my app. Basically I use pickerView:viewForRow:forComponent:reusingView delegate method returning a simple UILabel, to achieve better formatting. I noticed that VoiceOver reads label and adds, say, "3 of 300" (i.e. row number "of" total rows). This is not a desired behavior for my app. While trying to troubleshoot this, I found that if I use pickerView:titleForRow:forComponent instead, without any other changes, then I get the desired behavior of VoiceOver simply reading the "title" of the selected row. I tested this on iOS 9. Question is: how do I get UIPickerView back to the "normal" VoiceOver behavior, while still using pickerView:viewForRow:forComponent:reusingView? I didn't get any answers on StackOverflow. Asked Apple for help, but don't know how soon they will reply. I'm hoping that perhaps there are people on this forum with exactly the right experience. Thank you!

Options

  • Log in or register to post comments

Comments

Help UIPicker

By Dax Rahusen

7 years 4 months ago

Dear Alex,

Could you provide us with some class data?
You said you made a subclass of UIPickerView.
Maybe a github?

Good luck.

Greetings,

Dax

Hi Dax,

By Alex M

7 years 4 months ago

Hi Dax, Actually I didn't subclass UIPickerView. To customize picker's visual appearance by using its delegate methods. Part of that customization was to return UILabel from pickerView:viewForRow:forComponent:reusingView to have control over font family and size shown in the picker. I asked Apple how to fix this accessibility issue. And guess what their answer was: it is impossible to fix on current iOS versions! I came up with a workaround, that was fairly painless. You can read my question and answer on StackOverflow: https://stackoverflow.com/questions/37041272/ios-unexpected-voiceover-behavior-on-customized-uipickerview Cheers, -Alex

More Like This

[Bug] VoiceOver fails to focus element when navigating a table vertically (Forum Topic)
How to use AXBrailleMap and AXBrailleMapRenderer (Forum Topic)
Blindfold Phrase Madness (iOS and iPadOS App Directory)
Question about math tables in accessible apps (Forum Topic)
Accessible Game of Go? (Forum Topic)
google chrome oddities on the mac platform , (Forum Topic)
VoiceOver and WhatsApp (Forum Topic)
Volume Adjust Sounds in Boot Camp Are Gone (Forum Topic)

Site Information

  • About
  • Club AppleVis
  • FAQ
  • Contact

Unless stated otherwise, all content is copyright AppleVis. All rights reserved. © 2023 | Accessibility | Terms | Privacy