Skip to content

Conversation

@mwcampbell
Copy link
Contributor

I think the ignored field doesn't belong in the schema. Toolkit and application developers shouldn't be required to indicate which nodes should be excluded from the platform tree. This highlights a difference in design requirements between AccessKit and the Chromium accessibility schema; the latter is only intended for internal use within Chromium, not to be approachable to arbitrary toolkit or application developers.

Also, the criteria for determining which nodes should be excluded from the platform tree may be platform-dependent. And there may be cases where we want to traverse only the nodes that meet very specific criteria. So I believe we need to modify following_unignored_siblings and related functions to take a caller-supplied filter function.

It was convenient to mark arbitrary nodes as ignored for our tests, but we can accomplish the same thing using a test-only filter function alongside the test tree.

This PR does reverse an earlier optimization in the Windows adapter, that allowed it to navigate without resolving the target node. But this change enables a bigger optimization. By completely filtering out nodes that UIA clients don't need to see, we eliminate the process of allocating a platform node object, returning it, then going through all the steps for resolving the node when UIA calls a method like GetPropertyValue, all for a node that the UIA client doesn't need to see in the first place. This change will become important when we have numerous inline text box nodes, which don't need to be exposed as UIA elements. The same principle will likely apply to other platform adapters.

@mwcampbell mwcampbell merged commit a4befe6 into main Oct 16, 2022
@mwcampbell mwcampbell deleted the generic-filter branch October 16, 2022 15:07
@github-actions github-actions bot mentioned this pull request Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants