chore(swatch): use swatch-group in documentation sizes examples #5989
+12
−11
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.
Description
Updates swatch documentation to use
<sp-swatch-group>instead of<div>wrappers in the Sizes section, ensuring proper ARIA semantics for screen readers.Motivation and context
Swatches in the Sizes section documentation were wrapped in plain
<div>elements, causing each swatch to render withrole="button"andaria-pressed="false". This resulted in screen readers announcing "Mixed toggle button not pressed" for the mixed-value swatch, which is confusing and incorrect since these swatches are not functioning as toggle controls.By wrapping swatches in
<sp-swatch-group selects="multiple">, swatches receive proper checkbox semantics (role="checkbox") and themixed-valueswatches correctly usearia-checked="mixed".Related issue(s)
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Verify swatch documentation renders correctly with screen reader
yarn start:1st-gen(Storybook runs on http://localhost:8080)Verify swatch group semantics are correct
role="checkbox"instead ofrole="button"Device review
Note: This is a documentation-only change. No component code was modified. The change replaces
<div>wrappers with<sp-swatch-group selects="multiple">in the Sizes section examples.