How to Properly Implement NSSlider for VoiceOver on Mac?
How to Properly Implement NSSlider for VoiceOver on Mac?
- Subject: How to Properly Implement NSSlider for VoiceOver on Mac?
- From: Chi Kim <email@hidden>
- Date: Sun, 15 Apr 2018 10:40:42 +0000
- Thread-topic: How to Properly Implement NSSlider for VoiceOver on Mac?
Hi All,
This is a probably easy question.
I have a slider:NSSlider and valueLabel:NSTextField, and I'm wondering
what's the proper way to implement for VoiceOver.
I connected a send action for slider to sliderChanged function to update
valueLabel.
valueLabel.stringValue = String(slider.integerValue)
VoiceOver reads the label correctly, but it reads the slider in
percentage. To fix this, I changed sliderChanged function to
setAccessibilityValueDescription.
slider.setAccessibilityValueDescription(String(slider.integerValue))
Now VoiceOver correctly reads the value for the slider. However, it sees
both valueLabel and slider, so it's redundant.
I tried valueLabel.setAccessibilityElement(false), but VoiceOver doesn't
seem to ignore.
Could someone advise what would be the proper way to implement this?
Thanks!
Chi
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden