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

Fix controls not showing up in accessibility when made visibile #14424

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

grokys
Copy link
Member

@grokys grokys commented Jan 31, 2024

What does the pull request do?

When an invisible control is encountered, unless a peer is created for it, there is nothing to listen for the IsVisible property changing to true. Make sure we create a peer even for invisible controls; we just don't add them to the child collection. The peer will then pick up the control being made visible and cause the parent to recalculate its children.

There was already a test for when visibility moves from visible to invisible but we were missing one for the other way around.
When an invisible control is encountered, unless a peer is created for it, there is nothing to listen for the `IsVisible` property changing to `true`. Make sure we create a peer even for invisible controls; we just don't add them to the child collection.
@avaloniaui-bot
Copy link

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

@maxkatz6 maxkatz6 added this pull request to the merge queue Jan 31, 2024
@maxkatz6 maxkatz6 added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Jan 31, 2024
Merged via the queue into master with commit 8e479e5 Feb 1, 2024
7 checks passed
@maxkatz6 maxkatz6 deleted the fixes/a11y-control-visibility branch February 1, 2024 03:45
grokys added a commit that referenced this pull request Feb 1, 2024
* Add failing test for control visibility changing.

There was already a test for when visibility moves from visible to invisible but we were missing one for the other way around.

* Create peer even for invisible controls.

When an invisible control is encountered, unless a peer is created for it, there is nothing to listen for the `IsVisible` property changing to `true`. Make sure we create a peer even for invisible controls; we just don't add them to the child collection.
maxkatz6 pushed a commit that referenced this pull request Feb 8, 2024
* Add failing test for control visibility changing.

There was already a test for when visibility moves from visible to invisible but we were missing one for the other way around.

* Create peer even for invisible controls.

When an invisible control is encountered, unless a peer is created for it, there is nothing to listen for the `IsVisible` property changing to `true`. Make sure we create a peer even for invisible controls; we just don't add them to the child collection.
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Feb 8, 2024
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