-setAccessibilityFocus: on text elements and disabled buttons has virtually no effect
Originator: | lucas | ||
Number: | rdar://33512114 | Date Originated: | 25 July 2017 |
Status: | Open | Resolved: | |
Product: | macOS + SDK | Product Version: | macOS 10.13 Beta (17A315i) |
Classification: | UI/Usability Bug | Reproducible: | Always |
Area: Accessibility Summary: Programmatically moving the accessibility focus to accessibility elements does not work if the elements are text fields or dimmed buttons, although the property has been successfully set to YES. Steps to Reproduce: - Open the attached project. - Start VoiceOver. - Run the project. - In the console you will see which element has been programmatically selected. Expected Results: VoiceOver should cycle through all three elements (the disabled prevViewButton, the enabled nextViewButton and the multilineLabel), three times with one second between each switch, as specified in the code. Observed Results: VoiceOver only selects the enabled nextViewButton. Notes: The only way of programmatically selecting the multilineLabel is by setting the accessibilityElement property of both buttons to NO, so the label is the only available element. Being able to select the label programmatically is important, because labels can contain important information, while the buttons may just say "Agree" or "Cancel", which without context only confuses the user. The attached file can be downloaded here: https://peporal.de/bugs/Accessibility%20Focus.zip
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!
Workaround as suggested by the Apple Technical Support
Subclass NSTextFieldCell and implement:
- (BOOL)acceptsFirstResponder{ return YES; }
.This will make the text accessible by keyboard in general, so VoiceOver will be able to focus it too.