Comments (8)
@chingucoding
I think the most reliable way to solve this problem is probably not to call FindAll, but to use an IUIAutomationTreeWalker instead. How do you feel about giving that a try? If you want, I may be able to take a look in the coming days.
from axe-windows.
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!
from axe-windows.
The team requires additional author feedback; please review their replies and update this issue accordingly. Thank you for contributing to Accessibility Insights!
from axe-windows.
Sure, I can give that a try. Can you point me to an example of that or the general idea of how this could work @DaveTryon ?
from axe-windows.
Hi, @chingucoding!
I opened WinUI 2 Gallery in AIWin, and there are 2 processes here. The topmost process (the child of the desktop) is named ApplicationFrameHost.exe
. This process contains the system menu and the minimize/maximize/close buttons.
The second process, AppUIBasics.exe
has a window that is a child of window owned by the ApplicationFrameHost.exe
process. This the process that we're looking for. As pointed out earlier, we broke this in #676, where we limited the search to direct children of the desktop, rather than allowing the search to go arbitrarily deep.
The original code worked because it did a deep dive, effectively ignoring this note from the remarks section of the API documentation:
When searching for top-level windows on the desktop, be sure to specify TreeScope_Children in the scope parameter, not TreeScope_Descendants. A search through the entire subtree of the desktop could iterate through thousands of items and lead to a stack overflow.
So, to locate the process in question, we need to be able to do the following:
- Go at at least 2 levels of depth
- Look for elements that are not the first enumerated element
- Still be reasonably performant
I wasn't able to locate sample code that does this, so I coded something up. I've created a sample PR of what this might look like. It works locally for both UWP and non-UWP apps. I'm pretty sure that it's leaking memory from not releasing the items in nonMatchingElements
. Hopefully that should be fairly easy to sort out, though.
from axe-windows.
The team requires additional author feedback; please review their replies and update this issue accordingly. Thank you for contributing to Accessibility Insights!
from axe-windows.
Awesome @DaveTryon , I'll take a look and create a PR then. Please assign this issue to me.
from axe-windows.
This was fixed in release 1.1.7
from axe-windows.
Related Issues (20)
- [BUG] Got Error when using CaptureAction.SetLiveModeDataContext HOT 1
- ScanAsync needs overloads to scan process's UIA sub-trees HOT 2
- [Feature Request] Need Task<ScanResults> IScanner.ScanAsync() HOT 6
- [Feature Request] NativeMethods.SetProcessDPIAware() should be reset after scan HOT 6
- [Feature Request] Localization support in the CI/DI pipeline HOT 5
- CustomUIA settings have some overlap between async scans HOT 2
- Handle BoundingRectangleSizeReasonable rule for elements with area of less than 25 pixels HOT 15
- [Feature Request] Make scans against Chromium-based UIs more actionable HOT 9
- [BUG] Should NameIsInformative rule filter out more frameworks? HOT 6
- Re-enable Scan_Integration_WebViewSample test in PR build ? HOT 2
- [Feature Request] Provide a way for .a11ytest files to be retained even if a scan produces no errors HOT 6
- Update WiX from v3 to v4 HOT 4
- [Feature Request] Make DefaultActionContext public HOT 5
- [BUG] WinForms edit controls don't support TextPattern until .NET Framework 4.8.1 HOT 2
- [BUG] MSI installer should warn user about unsupported OS HOT 2
- [General Question] How to disable rules HOT 3
- [General Question] False positive for "The Name property must not include the element's control type." HOT 1
- [General Question] Why does axe-windows not include axe-core and its rules? HOT 4
- [BUG] *.yml and *.targets files should contain copyright headers
- [BUG] Axe.Windows files are signed with the 3rd party certificate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axe-windows.