You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/color-slider/README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,7 @@ The current color formats supported are as follows:
81
81
For a complete list of supported color formats, see the [ColorController documentation](/tools/color-controller#supported-color-formats).
82
82
83
83
**Please note for the following formats: HSV, HSVA, HSL, HSLA**
84
+
84
85
When using the HSL or HSV formats, and a color's value (in HSV) is set to 0, or its luminosity (in HSL) is set to 0 or 1, the hue and saturation values may not be preserved by the element's `color` property. This is detailed in the [colorjs documentation](https://colorjs.io/docs/). Seperately, the element's `value` property is directly managed by the hue as represented in the interface.
85
86
86
87
### Accessibility
@@ -91,6 +92,27 @@ The `<sp-color-slider>` is rendered with appropriate ARIA attributes to ensure a
91
92
- Provides value text announcements for screen readers
92
93
- Supports full keyboard navigation
93
94
95
+
#### Accessible Labels
96
+
97
+
The color slider includes an accessible label that describes what the slider controls. By default, the label is set to "hue", but you can customize it using the `label` attribute:
The label serves several important accessibility purposes:
109
+
110
+
-**Screen Reader Announcements**: Screen readers announce the label when the slider receives focus, helping users understand what they're adjusting
111
+
-**ARIA Labeling**: The label is used as the `aria-label` attribute on the internal range input
112
+
-**Context for Value Changes**: When the slider value changes, screen readers announce both the current value and the label for context
113
+
114
+
For example, when a user focuses on a color slider with `label="Color hue"`, screen readers will announce something like "Color hue slider, 180 degrees" to provide clear context about what the control does and its current value.
115
+
94
116
#### Keyboard Navigation
95
117
96
118
<sp-table>
@@ -117,11 +139,11 @@ The `<sp-color-slider>` is rendered with appropriate ARIA attributes to ensure a
0 commit comments