Skip to content

fix(web-components): quirks when utilizing DSD#35838

Draft
radium-v wants to merge 2 commits intomicrosoft:masterfrom
radium-v:users/radium-v/option-checks
Draft

fix(web-components): quirks when utilizing DSD#35838
radium-v wants to merge 2 commits intomicrosoft:masterfrom
radium-v:users/radium-v/option-checks

Conversation

@radium-v
Copy link
Contributor

@radium-v radium-v commented Mar 4, 2026

Previous Behavior

The selected setter in the DropdownOption component checked this.$fastController.isConnected before setting form value and aria attributes. This condition could pass even when elementInternals was not yet available, potentially causing errors when attempting to call setFormValue() or set ariaSelected.

New Behavior

The condition now checks for this.elementInternals directly before setting form value and aria attributes. This ensures these operations only occur when elementInternals is properly initialized and available.

This change is needed in scenarios which use declarative Shadow DOM, where the constructor() and connectedCallback() can happen simultaneously. Since everything happening in this block only requires elementInternals to be defined, and doesn't rely on the element being connected, it can safely be handled with the next tick regardless of the connected state.

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

📊 Bundle size report

✅ No changes found

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link

@github-actions github-actions bot Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-web-components/Accordion 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Accordion. - Dark Mode.normal.chromium_1.png 3154 Changed
vr-tests-web-components/MenuList 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/MenuList. - Dark Mode.normal.chromium.png 498 Changed
vr-tests-web-components/MenuList. - RTL.2nd selected.chromium.png 17 Changed
vr-tests-web-components/MenuList. - RTL.2nd selected.chromium_3.png 38816 Changed
vr-tests-web-components/RadioGroup 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/RadioGroup. - Dark Mode.1st selected.chromium_2.png 119 Changed

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.

2 participants