Skip to content

Improve VoiceOver labels for images/pop-ups etc.#857

Closed
dusek wants to merge 4 commits intotextmate:masterfrom
dusek:accessibility-labels
Closed

Improve VoiceOver labels for images/pop-ups etc.#857
dusek wants to merge 4 commits intotextmate:masterfrom
dusek:accessibility-labels

Conversation

@dusek
Copy link
Contributor

@dusek dusek commented Mar 2, 2013

These patches improve accessibility of UI elements in the main window by
setting proper descriptions for image buttons / pop-ups and proper roles.

Non-obvious stuff is discussed in commit messages of individual commits.

These patches are released to public domain by my employer, BRAILCOM,o.p.s.

dusek added 4 commits March 2, 2013 19:21
VoiceOver reads an AXValue for a pop-up button - that is the selected
item. But button's title does not set an AXValue, as it probably is
not a menu item. So change the code set to the title by setting a
single menu item with that title.

This fixes accessibility of the pop-up when accessing its value before
it is first popped up. It makes the code consistent with setGrammarName:
which works fine (that's how I discovered how to fix it).
This fixes semantics of the button and thus also its
accessibility. The macro recording button represents state - more
specifically a boolean state, so it has to be a NSToggleButton (or
its specialization). Then the button is presented to the VoiceOver
user as an AXCheckbox - that is a checkbox with on and off value -
which is exactly what the button's function is. Examples of this in
system apps is e.g. the "Play" button in QuickTime Player, which is
also an AXCheckbox ("Pause" is then simply an unchecked "Play"
checkbox).
@sorbits
Copy link
Member

sorbits commented Mar 3, 2013

Pulled as 7892eac...944e1e3.

Appreciate the commit messages!

@sorbits sorbits closed this Mar 3, 2013
@dusek dusek deleted the accessibility-labels branch March 3, 2013 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants