Repository navigation
fix(core): clear reflected ARIA attrs from host after sync - #31660
Merged
ShaneK merged 3 commits intoNov 12, 2026
Merged
Conversation
Post-load aria-label writes were copied onto the native control but left on the host, so VoiceOver exposed ion-button twice. Clear the host after each reflect, matching the initial inherit. Resolves ionic-team#31659 Co-authored-by: Cursor <[email protected]>
|
@masimplo is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
ShaneK
previously requested changes
Oct 27, 2026
ShaneK
left a comment
Member
There was a problem hiding this comment.
Thanks for this, the double announcement goes away with this change! Removing a label that was set after load doesn't clear it from the button anymore though, so an Angular [attr.aria-label] bound to null leaves the old name behind. The rest are small cleanups inline.
4 tasks done
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
# Conflicts: # core/src/components/button/button.tsx # core/src/components/card/card.tsx # core/src/components/item/item.tsx # core/src/utils/attribute-controller.ts # core/src/utils/test/attribute-controller.spec.ts
This branch was successfully deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue number: resolves #31659
What is the current behavior?
Currently, an
aria-labelwritten toion-buttonafter load is copied to the native button but also left on the host, so VoiceOver on iOS stops on both. Angular's[attr.aria-label]does this every time the binding changes.ion-itemandion-cardbehave the same way.What is the new behavior?
Once an
aria-label,aria-descriptionorrolewritten after load is copied, we replace it on the host with an empty string. That leaves the host without a name, and since the attribute is still there, removing it later still clears the native element. Other attributes stay on the host as before, andion-buttonnow syncs arolewritten after load too.A non-clickable
ion-cardorion-itemkeeps the label on the host, because it has no native element that can carry it.Does this introduce a breaking change?
Other information