Repository navigation
[Mac] Fix VoiceOver announcement for actionable CollectionView items - #37674
Merged
Merged
Conversation
Dhivya-SF4094
temporarily deployed
to
copilot-pat-pool
August 20, 2026 11:47 — with
GitHub Actions
Inactive
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37674Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37674" |
Dhivya-SF4094
temporarily deployed
to
copilot-pat-pool
August 20, 2026 11:47 — with
GitHub Actions
Inactive
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Dhivya-SF4094
had a problem deploying
to
copilot-pat-pool
August 20, 2026 11:48 — with
GitHub Actions
Failure
Dhivya-SF4094
temporarily deployed
to
copilot-pat-pool
August 20, 2026 11:49 — with
GitHub Actions
Inactive
Dhivya-SF4094
temporarily deployed
to
copilot-pat-pool
August 20, 2026 11:49 — with
GitHub Actions
Inactive
Dhivya-SF4094
temporarily deployed
to
copilot-pat-pool
August 20, 2026 11:50 — with
GitHub Actions
Inactive
sheiksyedm
marked this pull request as ready for review
August 20, 2026 12:44
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
/azp run maui-pr-uitests , maui-pr-devicetests |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes VoiceOver’s missing “actionable” role announcement for selectable CollectionView items on iOS/MacCatalyst by ensuring the UIAccessibilityTrait.Button trait is applied to the actual native accessibility element (not just the root templated child view).
Changes:
- Update iOS
UICollectionViewCellaccessibility trait assignment to recursively locate the firstIsAccessibilityElement == truedescendant (while skippingUIControlsubtrees) and apply/remove the Button trait based onSelectionMode. - Add iOS/MacCatalyst device tests validating the Button trait is applied to a nested accessibility element for selectable items and cleared when switching to
SelectionMode.None.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Controls/src/Core/Platform/iOS/Extensions/AcessibilityExtensions.cs | Finds the correct accessibility element within the cell template subtree and applies/removes UIAccessibilityTrait.Button without overriding native control roles. |
| src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.iOS.cs | Adds regression tests covering nested accessibility elements and trait clearing on selection-mode changes. |
Suppressed comments (1)
src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.iOS.cs:199
- Same as above: add explicit assertions for
taskAccessibilityElementand itsHandlerbefore accessingPlatformViewso the failure mode is clearer if the item template hasn't been realized yet.
await Task.Delay(100);
This comment has been minimized.
This comment has been minimized.
This was referenced Sep 21, 2026
Contributor
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This was referenced Sep 23, 2026
kubaflo
approved these changes
Sep 30, 2026
kubaflo
added a commit
that referenced
this pull request
Sep 30, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Oct 3, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Oct 6, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Oct 13, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Oct 14, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Oct 18, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Oct 21, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2 tasks done
kubaflo
added a commit
that referenced
this pull request
Oct 25, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Oct 26, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 28, 2026
…llectionView items (#39012) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Recreates #37674 for `inflight/current`, porting the merged commit 904c032 without unrelated `main` changes. The implementation and four device regression tests are preserved; the accessibility extension's whitespace is normalized to repository formatting. Selectable CollectionView items on iOS/Mac Catalyst apply the Button accessibility trait to the first exposed accessibility element within the item template instead of an inaccessible container. Native UIControl subtrees keep their existing roles. Per-cell state tracks traits added by CollectionView so disabling selection clears only framework-added traits, preserving developer-assigned Button traits. Includes the original semantic-property mapper hook and device tests for nested accessibility elements, native-control roles, disabling selection, and changing accessibility targets. ### Issues Fixed Fixes #37140. Original PR: #37674 by @Dhivya-SF4094. ### Validation - Original patch applied cleanly to `inflight/current` and matched the source commit's stable patch ID before whitespace formatting. - Formatting verification and `git diff --check` passed. - MAUI build tasks and the Mac Catalyst Controls device-test app built successfully. - Local execution of the four original regression tests was attempted but blocked: the pinned XHarness tool requires `Microsoft.NETCore.App 11.0.0-rc.1.26420.103`, which is not installed. No passing device-test result is claimed; CI validation is pending. Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Detail
On Mac Catalyst, VoiceOver announces selectable task items in a CollectionView only by name, without an actionable role. Although users can activate the item with Control + Option + Space, they are not informed that it is interactive. VoiceOver should announce an appropriate role, such as “button,” for selectable items.
Root Cause
Description of Change
Validated the behaviour in the following platforms
Issues Fixed:
Fixes #37140
Screenshots
37140_BeforeFix.mov
37140_AfterFix.mov