Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Don't include two windows in a11y tree. #15899

Merged
merged 4 commits into from
Jun 25, 2024

Conversation

grokys
Copy link
Member

@grokys grokys commented Jun 3, 2024

What does the pull request do?

Previously due to the way we were handling the macOS accessibility/automation APIs, two Windows were showing up in the accessibility tree.

This fixes that so that there is only a single Window showing up. To do this, AvnRootAccessibilityElement has been removed and now AvnWindow handles the accessibility protocol itself, exposing its children via the AvnView.

The integration tests have been updated to no longer expect an extraneous Window in the automation tree.

As part of this working, I also started moving various classes outside of accessibility.mm/.h and into their own files to make navigation in xcode a little easier.

Before:

image

After:

image

grokys added 2 commits May 28, 2024 23:47
`AvnRootAccessibilityElement` has been removed and now `AvnWindow` handles the accessibility protocol itself, exposing its children via the `AvnView`.
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0048765-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@grokys grokys added the bug label Jun 4, 2024
@maxkatz6
Copy link
Member

maxkatz6 commented Jun 5, 2024

This PR will conflcit with #15800, so need to carefully decide which to merge first.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049283-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@grokys grokys added this pull request to the merge queue Jun 25, 2024
Merged via the queue into master with commit aab93ff Jun 25, 2024
11 checks passed
@grokys grokys deleted the fixes/macos-duplicate-a11y-window-2 branch June 25, 2024 19:03
Gillibald pushed a commit to Gillibald/Avalonia that referenced this pull request Jul 29, 2024
* Don't include two windows in a11y tree.

`AvnRootAccessibilityElement` has been removed and now `AvnWindow` handles the accessibility protocol itself, exposing its children via the `AvnView`.

* Remove hack now that issue is fixed.

* Fix build errors after merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants