Fix reporting of "not checked" for check boxes with no other states in browse mode. #10781
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Link to issue number:
none. Fixes a regression introduced by #7279.
CC @leonardder.
Summary of the issue:
STR:
data:text/html,<div role="checkbox">test
Description of how this pull request fixes the issue:
When determining whether the caller wants states, we must differentiate between None and the empty set. If the caller didn't want states, states will be None. However, empty states means the caller still wants states, but the object had no states; e.g. an unchecked check box with no other states. After #7279 but before this PR, we treated an empty set as if the caller didn't want states.
Testing performed:
As above.
Known issues with pull request:
None known.
Change log entry:
Bug fixes:
- In browse mode, NVDA now reports "not checked" for unchecked check boxes where it sometimes didn't previously.