Skip to content

Commit

Permalink
fix(color-picker): added more descriptive assistive text and fixed ta…
Browse files Browse the repository at this point in the history
…bindex on swatches
  • Loading branch information
Lee White committed Aug 16, 2017
1 parent 5e8a358 commit fc989c1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ui/components/color-picker/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const ColorPickerSummary = (props) => {
sprite="utility"
symbol="down"
/>
<span className="slds-assistive-text">Choose a color</span>
<span className="slds-assistive-text">Choose a color. Current color: #5679C0</span>
</Button>

<FormElement
Expand Down Expand Up @@ -118,7 +118,12 @@ export const ColorPickerSwatches = (props) => {
<ul className="slds-color-picker__swatches" role={swatchesRole}>
{swatchColors.map((swatch, index) =>
<li key={_.uniqueId('color-picker-swatch-')} className="slds-color-picker__swatch" role="presentation">
<a className="slds-color-picker__swatch-trigger" role={linkRole} href="#">
<a
className="slds-color-picker__swatch-trigger"
href="#"
role={linkRole}
tabIndex={index === 0 ? 0 : -1}
>
<Swatch color={swatch} index={index} />
</a>
</li>
Expand Down

0 comments on commit fc989c1

Please sign in to comment.