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
**Added**: field label mixin to insert a label in a component's shadow DOM to resolve cross-root ARIA issues (`export class FormField extends FieldLabelMixin(SpectrumElement, 'label')` to apply mixin with a `label` slot to a class and `this.renderFieldLabel('field_id')` to render a field label for an element with `id="field_id"`)
A color field must have a label in order to be accessible. A label can be provided either via the default slot, or via the `label` attribute, for a hidden label that can be read by assistive technology. If no label is provided, the component will have a visually hidden label with the text `color`.
If the input value is not a valid color, `<sp-color-field>` will not accept it and may show validation feedback:
117
196
118
197
```html
119
-
<sp-color-fieldvalue="not a color"></sp-color-field>
198
+
<sp-color-fieldvalue="not a color">Icon color</sp-color-field>
120
199
```
121
200
122
201
### Behaviors
@@ -134,7 +213,7 @@ For a complete list of supported color formats, see the [ColorController documen
134
213
A hexadecimal color is specified with: `#RRGGBB`. `RR` (red), `GG` (green) and `BB` (blue) are hexadecimal integers between `00` and `FF` specifying the intensity of the color.
@@ -144,7 +223,7 @@ A hexadecimal color is specified with: `#RRGGBB`. `RR` (red), `GG` (green) and `
144
223
Shorthand hexadecimal color values are also supported. `#RGB` is a shorthand for `#RRGGBB`. In the shorthand form, `R` (red), `G` (green), and `B` (blue) are hexadecimal characters between `0` and `F`. Each character is repeated to create the full 6-digit color code. For example, `#123` would expand to `#112233`.
@@ -164,7 +247,11 @@ An RGB color value is specified with: rgb(red, green, blue). Each parameter defi
164
247
An RGBA color value is specified with: `rgba(red, green, blue, alpha)`. The `alpha` parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).
@@ -174,7 +261,11 @@ An RGBA color value is specified with: `rgba(red, green, blue, alpha)`. The `alp
174
261
An HSL color value is specified with: hsl(hue, saturation, lightness). Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and 240 is blue. Saturation and lightness are percentages.
@@ -184,7 +275,11 @@ An HSL color value is specified with: hsl(hue, saturation, lightness). Hue is a
184
275
An HSV color value is specified with: hsv(hue, saturation, value). Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and 240 is blue. Saturation and value are percentages.
0 commit comments