AppKit: NSSegmentedControl/NSSegmentedCell has no accessor for the key segment

Originator:rix.rob
Number:rdar://19785679 Date Originated:10-Feb-2015 03:34 PM
Status:Open Resolved:
Product:OS X Product Version:Mac OS X 10.10.2 (14C109)
Classification:Other Bug Reproducible:Always
 
Summary:
Custom NSSegmentedControls which have a different silhouette than the AppKit defaults (e.g. text-only, like the ones Xcode uses widely in e.g. its preferences) cannot easily draw focus rings correctly, because there’s no accessor for which segment is key. You can make the next/previous segments key, but can’t access the currently-key segment, which means you’d have to duplicate a lot of AppKit logic or access the private _keySegment method/ivar on NSSegmentedCell in order to draw the focus ring properly around just the key segment.

This is nasty for accessibility purposes. Full keyboard access relies on you being able to tell what you’re doing, and this lapse in the API makes that difficult. Notably, Xcode opted not to do the work above, so it gets no focus rings for those controls, which is terrible.


Steps to Reproduce:
N/A

Expected Results:
N/A

Actual Results:
N/A

Regression:
N/A

Notes:
N/A

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!