microsoft / accessibility-insights-windows

Accessibility Insights for Windows
https://accessibilityinsights.io
Other
410 stars 99 forks source link

[General Question] Warning for each list item in a win32 list control in report mode #1843

Open skuskusku opened 1 week ago

skuskusku commented 1 week ago

How do I handle the warning I get for each list control item in a win32 list control in report mode about non-conforming structure

My application uses a pretty standard win32 list control (syslistview32) from comctl32 in report mode. If I run AI4Win tests against it, I get a warning for each and every list control item about a seemingly non-conforming structure. The warning message text is the following:

"The given element is expected to have the following structure: ListItem and NoChild(IsContentElement)."

The suggested fix goes like this: "Set the element to conform to the following structure: ListItem and NoChild(IsContentElement)."

I do not have the faintest idea what AI4Win is telling me here, can please somebody explain? Is there something I can do to avoid this warning?

Any help appreciated,

-- Stefan

v-viyada commented 1 week ago

@skuskusku Thanks for reaching out. In order for us to investigate this issue we need some way to replicate it. Can you provide a sample app that shows the behavior as well as the a11ytest file if you captured it? This will allow us to investigate what may be happening in this scenario. Thanks!

skuskusku commented 5 days ago

I have uploaded a sample app here: https://mcblogs.craalse.de/skufiles/2024/jul/listctrltest_1843.zip

In order to build you have to have MFC with static libraries installed with VS2022. If you run an AI4Win test on the samples dialog, it will pass without errors. Now look into the test results in the automation pane and drill down from the list control to its first item with the text

list item 'Row 0 Column 0'

in the automation tree and click on the link labeled "Passed and Uncertain tests (24)" and you will see that this element shows the warning and suggested fix text I mentioned in my initial text for this issue.

The .a11ytest file is here:

https://mcblogs.craalse.de/skufiles/2024/jul/1843.a11ytest