UISegmentedControl in UITableView section header has wrong UIAccessibilityTraits

Originator:futuretap
Number:rdar://28738194 Date Originated:12-Oct-2016 08:12 PM
Status:Open Resolved:
Product:iOS Product Version:10.1 beta 3
Classification:Other Bug Reproducible:Always
 
Summary:
When a UISegmentedControl is placed in a UITableView section header it uses incorrect accessibility traits.

Steps to Reproduce:
Run the attached sample app and enable VoiceOver (or the Accessibility Inspector)

Expected Results:
When hovering over the segmented control, it should read "First, Button, Selected, 1 of 2".
So the segmented control item should have the traits: UIAccessibilityTraitButton, UIAccessibilityTraitSelected, plus the private trait for the segmented control ("1 of 2").

Actual Results:
It reads "First, Header". The segmented  control item has the traits: UIAccessibilityTraitStaticText, UIAccessibilityTraitHeader.

Note:
This affects us badly in our Where To? app (http://itunes.apple.com/app/id903955898?mt=8) because the user doesn't understand that the segmented control in the details view is actually interactive and not static text.
Also there's no workaround (other than completely rewriting UISegmentedControl) because the UISegment subview is not public and even if it where, its accessibilityTraits property is not writable.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!