Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map IAccessible2's checkable state to NVDA's checkable state #11377

Merged
merged 1 commit into from Jul 19, 2020

Conversation

michaelDCurran
Copy link
Member

@michaelDCurran michaelDCurran commented Jul 14, 2020

Link to issue number:

None.

Summary of the issue:

Accessible objects exposed via IAccessible2 may have the IAccessible2 checkable state (IA2_STATE_CHECKABLE) to state that they can be checked (E.g. a checkable list item).
This state should be mapped to NVDA's checkable state so that NVDA knows to correctly report "not checked" when the object in question does not have the checked state.
Historically, as a sort of hack, Mozilla Firefox has exposed the MSAA STATE_SYSTEM_MARQUEED to denote checkable, and NVDA has honored this.
However, since then, IAccessible2 introduced its own checkable state, and Chrome is doing the right thing by exposing this.

Description of how this pull request fixes the issue:

Simply maps IA2_STATE_CHECKABLE to NVDA's STATE_CHECKABLE.
The existing support for STATE_SYSTEM_MARQUEED specific to Mozilla Firefox is still kept as Firefox does not seem to expose the IAccessible2 checkable state yet.

Testing performed:

Tested the following testcase in both Firefox and Chrome:

data:text/html,<div role="listbox"><div role="option" aria-checked="false">frogs</div></div>

And ensured that in both browsers NVDA reported not checked for the "frogs" list item.
Note that providing an aria attribute of aria-checked (set to either true or false) will expose the checkable state, and checked when it is set to true.

Known issues with pull request:

None.

Change log entry:

Bug fixes:
NVDA will now report not checked for certain controls in Google Chrome that are checkable but currently not checked.

@michaelDCurran michaelDCurran requested a review from feerrenrut Jul 15, 2020
@michaelDCurran michaelDCurran merged commit 76f48cd into master Jul 19, 2020
1 check passed
@michaelDCurran michaelDCurran deleted the ia2CheckableState branch Jul 19, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.3 milestone Jul 19, 2020
michaelDCurran added a commit that referenced this pull request Jul 19, 2020
@leonardder
Copy link
Collaborator

leonardder commented Jul 22, 2020

In Chrome, this pr causes a regression for toggle buttons, which get the checkable state. Therefore, toggle buttons are reported as pressed not checked.

Test case

data:text/html, <button aria-pressed="true">hello</button>

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.

None yet

4 participants