UIA: Support half checked state for checkboxes and toggle buttons#13980
Conversation
|
This looks good to me, is there a reason it is still a draft? |
|
It currently says for toggle buttons |
|
Please ensure that you test with how this affects the reporting of "indeterminate progress bars" which may use the same state, but a different role. We don't want them to be reported as "progress bar half checked". See implementation of "busy indicator": #13428 |
|
This does not effect progress bars as the indeterminate state is fetched using the UIA toggle pattern, which is either on, off, or indeterminate. It's specific to toggle buttons and checkboxes. UIA doesn't seem to have a way to fetch if a progress bar is indeterminate. |
|
Half pressed for toggle sounds good to me. I cannot tell if it conveys the way it looks visually, but conveys the meaning. |
|
@Mazen428, please mark this pull request as ready for review. |
|
I don't have a braille display so can't add or test the state in braille, so if someone could that'd be great |
|
@cary-rowen, would you test this on your braille display? |
|
Answer what you care about first: The sample I tested is as follows(Enchantment table checkBox): |
|
Also, I don't know if it will be off topic. NVDA can report the checked state of a checkbox in time when UIA is disabled, but Braille can only have two states, checked or unchecked. |
|
Thank you. Could you test with braille using this WPF application? |
|
WPF example: The checkbox works as expected for both speech and Braille. the indeterminate state is represented in Braille with the appropriate symbol for the halfchecked state. Checkboxes work as expected for both speech and braille. The half checked checkbox is represented in braille with the appropriate symbol for the halfchecked state. |
|
Ok, I think the half pressed braille state is fixed. |
See test results for failed build of commit cbede09d0e |
|
|
I can reproduce this on 2022.2, I'm not sure how to fix it and I agree it should be fixed in another PR. |
Yes it is. Thanks @Mazen428 for your work on this PR. It has also helped me in my journey to understand NVDA internals. |
In the future, testing using Braille Viewer should be sufficient. |
| if s == UIAHandler.ToggleState_Indeterminate: | ||
| if role == controlTypes.Role.TOGGLEBUTTON: | ||
| states.add(controlTypes.State.HALFPRESSED) | ||
| else: |
There was a problem hiding this comment.
Shouldn't this explicitly check if this is a checkbox?
| else: | |
| elif role == controlTypes.Role.CHECKBOX: |
There was a problem hiding this comment.
There are checkable tree view items, so just in case, if it has a toggle pattern then the state is added
Link to issue number:
Fixes #13975
Summary of the issue:
NVDA does not support 3 state checkboxes and toggle buttons with UIA. When using WPF or Microsoft edge UIA.
Description of user facing changes
When a checkbox is partially checked, NVDA will report half checked, same as the turn features control panel applet.
Description of development approach
in NVDAObjects\UIA, if toggle state is indeterminate, add half checked state
Testing strategy:
Tested using WPF three-state checkbox and toggle button. And with using UIA chromium-baste browsers on, tested with Microsoft Edge.
Known issues with pull request:
None.
Change log entries:
Bug fixes
Code Review Checklist: