accessibility-insights-windows
accessibility-insights-windows copied to clipboard
[BUG] Checkboxes in event configuration don't report checked/unchecked with a screen reader
Describe the bug
When checking and unchecking the checkboxes used to configure event listening while using a screen reader, the checked state is not being reported as it changes.
To Reproduce
Steps to reproduce the behavior:
While running a screen reader
- Open Accessibility Insights for Windows
- Select any element in another app by either hovering with the mouse or by setting focus
- Press Shift + F9 to take focus to the Inspect tree in AI-Win
- Right click an element in the Inspect tree and choose "listen to events".
- In the event configuration tree, press the spacebar on any checkable item.
Expected behavior
The checked/unchecked state should be announced as the state of the item changes
Actual behavior
No state change is announced.
Desktop (please complete the following information):
- OS: 21H2 (OS Build 19044.1645)
- Accessibility Insights for Windows Version: 1.1.1934.1
Repro'd with NVDA; confirmed. The "listen to all events" checkbox at the bottom of the list doesn't have this issue but the rest of the checkboxes do.
This issue has been marked as ready for team triage; we will triage it in our weekly review and update the issue. Thank you for contributing to Accessibility Insights!
I can also repro this with both NVDA and Narrator.
The "listen to all events" checkbox at the bottom of the list doesn't have this issue
It's a separate control in the tab order (i.e. separate from the tree view) of a different type (checkbox, not checkable tree item).
On further investigation, it looks like the tree control is custom. Notably, its UIA implementation does not implement TogglePattern
(focus an item with NVDA and examine the NVDA+F1 log) or send property change events when the checked state of the individual items is changed. Options:
- Change to a standard tree control that would seemingly implement the events/pattern.
- Implement
TogglePattern
and property changes manually: this tutorial by Guy Barker walks through adding this functionality to a custom tree control for another app, showing the work involved.
@DaveTryon and @RobGallo, should I work on a PR implementing one of these options?
@codeofdusk, the control here is a TreeView with some styles attached. The XAML is here. Each child of the TreeView is a TreeViewItem, which contains a CheckBox. The CheckBox implements TogglePattern but the TreeViewItem does not. Given the degree of styling here, I'd guess that the safer change is to plumb the TogglePattern through the TreeViewItem.