accessibility-insights-windows icon indicating copy to clipboard operation
accessibility-insights-windows copied to clipboard

[BUG] Checkboxes in event configuration don't report checked/unchecked with a screen reader

Open RobGallo opened this issue 2 years ago • 5 comments

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

  1. Open Accessibility Insights for Windows
  2. Select any element in another app by either hovering with the mouse or by setting focus
  3. Press Shift + F9 to take focus to the Inspect tree in AI-Win
  4. Right click an element in the Inspect tree and choose "listen to events".
  5. 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

RobGallo avatar Apr 25 '22 18:04 RobGallo

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.

jlperkins avatar Apr 25 '22 20:04 jlperkins

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!

ghost avatar Apr 25 '22 20:04 ghost

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).

codeofdusk avatar May 12 '22 08:05 codeofdusk

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 avatar May 12 '22 09:05 codeofdusk

@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.

DaveTryon avatar May 12 '22 17:05 DaveTryon