cocoabits / MASShortcut

Modern framework for managing global keyboard shortcuts compatible with Mac App Store. More details:
http://blog.shpakovski.com/2012/07/global-keyboard-shortcuts-in-cocoa.html
BSD 2-Clause "Simplified" License
1.52k stars 220 forks source link

Not visible to VoiceOver #152

Open michaeljtsai opened 3 years ago

michaeljtsai commented 3 years ago

I think this used to work, but as of now (compiling with Xcode 12.3, running on macOS 10.15.7 and 11.2 beta), it’s not possible to select the MASShortcutView using VoiceOver, and I don’t hear the accessibility notifications when the shortcut is changed. I think I was able to fix this by overriding -[MASShortcutView isAccessibilityElement] to return YES. The documentation suggests that this is necessary, so I don’t understand why it was working for me before without doing this.

shpakovski commented 3 years ago

@michaeljtsai Thanks a lot for the heads up! Could you please make a pull request? 🙏

michaeljtsai commented 3 years ago

I was hoping someone who knows more about this would have insight into why it worked before without this and therefore whether this is in fact the right fix. But, yes, I can make a PR: https://github.com/shpakovski/MASShortcut/pull/153

Kentzo commented 3 years ago

@michaeljtsai Probably Apple used to have additional checks that were not documented (e.g. by explicitly looking for other accessibility methods in the interface).

By the way, could you try your accessibility testing routine with https://github.com/Kentzo/ShortcutRecorder? It appears to work for me but I do not casually use Accessibility.

michaeljtsai commented 3 years ago

That works, too.