Skip to content
Permalink
Browse files

fix(color-picker): added more descriptive assistive text and fixed ta…

…bindex on swatches
  • Loading branch information...
Lee White
Lee White committed Aug 16, 2017
1 parent 5e8a358 commit fc989c1ed840014757b9b976ccf12bebbf7dd6d4
Showing with 7 additions and 2 deletions.
  1. +7 −2 ui/components/color-picker/index.jsx
@@ -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
@@ -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>

0 comments on commit fc989c1

Please sign in to comment.
You can’t perform that action at this time.