Skip to content

Commit fc989c1

Browse files
author
Lee White
committed
fix(color-picker): added more descriptive assistive text and fixed tabindex on swatches
1 parent 5e8a358 commit fc989c1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ui/components/color-picker/index.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const ColorPickerSummary = (props) => {
8282
sprite="utility"
8383
symbol="down"
8484
/>
85-
<span className="slds-assistive-text">Choose a color</span>
85+
<span className="slds-assistive-text">Choose a color. Current color: #5679C0</span>
8686
</Button>
8787

8888
<FormElement
@@ -118,7 +118,12 @@ export const ColorPickerSwatches = (props) => {
118118
<ul className="slds-color-picker__swatches" role={swatchesRole}>
119119
{swatchColors.map((swatch, index) =>
120120
<li key={_.uniqueId('color-picker-swatch-')} className="slds-color-picker__swatch" role="presentation">
121-
<a className="slds-color-picker__swatch-trigger" role={linkRole} href="#">
121+
<a
122+
className="slds-color-picker__swatch-trigger"
123+
href="#"
124+
role={linkRole}
125+
tabIndex={index === 0 ? 0 : -1}
126+
>
122127
<Swatch color={swatch} index={index} />
123128
</a>
124129
</li>

0 commit comments

Comments
 (0)