fix(web-components): remove unnecessary id property mappings in accordion-item#36060
Merged
radium-v merged 3 commits intomicrosoft:masterfrom Apr 28, 2026
Merged
Conversation
📊 Bundle size report✅ No changes found |
|
Pull request demo site: URL |
chrisdholt
approved these changes
Apr 27, 2026
davatron5000
approved these changes
Apr 27, 2026
Contributor
davatron5000
left a comment
There was a problem hiding this comment.
Nice work! Extremely simplified.
Co-authored-by: Copilot <copilot@github.com>
b9b60b6 to
d73530e
Compare
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.
Previous Behavior
The
BaseAccordionItemclass was overriding the nativeidproperty with an@attr-decorated version that generated a unique ID viauniqueId(). This was only needed to wire uparia-controlsandaria-labelledbybetween the heading button and the content panel inside the shadow DOM. Since those references never cross the shadow boundary, they don't need to be derived from the host element'sidat all.New Behavior
This PR removes the
@attr idoverride and switches the template to use static internal IDs (controlandpanel) for the ARIA linkage. This also removes theuniqueIdandtoggleStateimports that are no longer needed, and adds@observabletoexpandbuttonso it participates in FAST's reactivity system.The test
should set internal properties to match the id when providedhas been removed since it asserted the old coupling behavior. All remaining accordion tests pass.I've verified via VoiceOver that screen reader support remains unaffected, with no observed changes to the output or navigation.