PositionInSet and SizeOfSet do not take into account hidden/collapsed elemnts
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
Elements that present a collection of items (such as a Menu with MenuItems or a ListView with ListViewItems) do not take into account non-visible elements when calculating PositionInSet and SizeOfSet. This results in screen readers announcing incorrect information.
### Reproduction Steps
Create a WPF project that contains one such element. For example, consider the following XAML:
```xaml
```
Compile this project, open Windows Narrator, and select one of the two visible items in the list.
### Expected behavior
When selecting the first item, Windows Narrator should announce "1 of 2." When selecting the second item (C), Windows Narrator should announce "2 of 2."
### Actual behavior
When selecting the first item, Windows Narrator announces "1 of 3." When selecting the second item (C), Windows Narrator announces "3 of 3."
### Regression?
_No response_
### Known Workarounds
_No response_
### Impact
This is an accessibility issue, since screen readers announce incorrect information.
### Configuration
_No response_
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.