File tree Expand file tree Collapse file tree
2nd-gen/packages/swc/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,3 +176,9 @@ All 14 original color variants remain available and are unchanged.
176176- When placing a badge alongside an icon in the `icon` slot , ensure the icon is
177177 decorative (hidden from assistive technology) if the text label already conveys
178178 the full meaning.
179+ - For icon-only badges (no visible text ), set `aria-label ` directly on the `swc-badge `
180+ element to provide an accessible name. A badge with no visible text and no
181+ `aria-label ` has no accessible name and fails WCAG 4.1.2 .
182+ - `variant` does not set any ARIA states. The meaning of a badge comes from its label
183+ text , not from the color. Do not add `aria-invalid `, `role="status"`, or similar
184+ attributes based on `variant` value alone.
Original file line number Diff line number Diff line change @@ -130,9 +130,15 @@ The new internal class names applied to the inner element are:
130130## Accessibility
131131
132132- ` swc-divider ` sets ` role="separator" ` automatically in ` firstUpdated ` . Do not provide
133- a conflicting ` role ` attribute unless you have a specific need to override it.
134- - When used vertically, ` aria-orientation="vertical" ` is set automatically.
133+ a conflicting ` role ` attribute.
134+ - When used vertically, ` aria-orientation="vertical" ` is set automatically. For
135+ horizontal dividers the attribute is omitted, which is correct — the default
136+ orientation for ` separator ` is horizontal.
135137- The divider is non-focusable and non-interactive in both generations.
136- - ` static-color="white" ` and ` static-color="black" ` are intended for use on
137- colored or photographic backgrounds. Ensure sufficient contrast between the divider
138- color and its background.
138+ - ` static-color="white" ` and ` static-color="black" ` are intended for use on colored or
139+ photographic backgrounds. Ensure sufficient contrast between the divider color and
140+ its background (WCAG 1.4.11 non-text contrast).
141+ - A divider is a visual supplement to page structure, not a replacement for it.
142+ Headings and landmarks still define sections for screen reader users — a divider alone
143+ does not communicate that a new section has begun. Use fewer dividers where headings
144+ or whitespace can carry the structural meaning.
Original file line number Diff line number Diff line change @@ -167,7 +167,9 @@ a light static background that falls outside the normal theme.
167167## Accessibility
168168
169169- Always provide ` label ` with a meaningful description. When ` label ` is set, the
170- component applies ` aria-label ` to the host element.
170+ component applies ` aria-label ` to the host element. Prefer task-specific labels
171+ ("Uploading document", "Processing request") over the generic default ("Loading")
172+ whenever context is available.
171173- ` swc-progress-circle ` sets ` role="progressbar" ` automatically in ` firstUpdated ` .
172174 Do not provide a conflicting ` role ` attribute.
173175- In determinate mode (` progress ` is set), ` aria-valuenow ` , ` aria-valuemin="0" ` ,
@@ -177,3 +179,9 @@ a light static background that falls outside the normal theme.
177179 correctly announces the component as having no known progress value.
178180- A development-mode warning is emitted when no accessible name can be determined.
179181 Provide either ` label ` or text content in the default slot to satisfy this requirement.
182+ - Do not add ` aria-live="assertive" ` to or around ` swc-progress-circle ` — it will
183+ interrupt screen reader users continuously. Use ` aria-live="polite" ` only when a
184+ deliberate status update is needed, and avoid it when multiple components on the page
185+ may update simultaneously.
186+ - Respect ` prefers-reduced-motion ` . The indeterminate spinner animation should be
187+ suppressed or slowed when the user has requested reduced motion.
Original file line number Diff line number Diff line change @@ -195,6 +195,15 @@ All remaining original variants continue to work unchanged.
195195 meaningful text — do not use the component without a text label , as the indicator dot
196196 alone conveys no accessible information.
197197- Do not rely on color alone to convey status. The text label must independently
198- communicate the state.
198+ communicate the state (WCAG 1.4.1 ).
199+ - The status dot is rendered as a CSS `::before ` pseudo-element and is purely
200+ decorative. No additional ARIA attributes are needed for it.
201+ - Do not add `role="status"` or `aria-live ` to `swc-status-light ` for static usage.
202+ These attributes imply live updates and will cause screen readers to announce the
203+ component at unexpected times. If content genuinely updates live, manage the live
204+ region at the application level rather than on the component itself.
205+ - `variant` does not set any ARIA states. The meaning comes from the label text , not
206+ the color. Do not map `variant` values to attributes like `aria-invalid ` or
207+ `aria-label ` automatically.
199208- With `disabled` removed, there is no mechanism to convey "unavailable" visually
200209 beyond writing it in the label text . This is intentional per the Spectrum 2 spec.
You can’t perform that action at this time.
0 commit comments