Open
Description
Description
When a menu is populated with menu items in XAML, Windows Narrator can get the position info of each menu item and will announce them when focused.
However, when the menu items are generated from ItemsSource
. The narrator won't be able to get position info and therefore won't announce it
<!-- This works -->
<Menu>
<MenuItem Header="A" />
<MenuItem Header="B" />
<MenuItem Header="C" />
</Menu>
<!-- This doesn't. ItemHeaders can be a list of strings -->
<Menu ItemsSource={Binding ItemHeaders} />
More specifically, MenuItemAutomationPeer
throws exceptions in GetPositionInSet
and GetSizeOfSet
if ItemsSource
is used.
Reproduction Steps
- Create a menu with
ItemsSource
bound to a collection of string - Run the application.
- Run Windows Narrator
- Tab over the menu items
Expected behavior
The narrator should announce the header of a menu item as well as its position, e.g. 3 of 5
Actual behavior
Only the header is announced by the narrator
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response