Skip to content

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

Merged
michaelDCurran merged 1 commit into
masterfrom
ia2CheckableState
Jul 19, 2020
Merged

Map IAccessible2's checkable state to NVDA's checkable state#11377
michaelDCurran merged 1 commit into
masterfrom
ia2CheckableState

Conversation

@michaelDCurran

Copy link
Copy Markdown
Member

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 merged commit 76f48cd into master Jul 19, 2020
@michaelDCurran michaelDCurran deleted the ia2CheckableState branch July 19, 2020 21:16
@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

LeonarddeR commented Jul 22, 2020

Copy link
Copy Markdown
Collaborator

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.

4 participants