diff --git a/src/components/block/__snapshots__/spec.js.snap b/src/components/block/__snapshots__/spec.js.snap index 8affe493..e98b6882 100644 --- a/src/components/block/__snapshots__/spec.js.snap +++ b/src/components/block/__snapshots__/spec.js.snap @@ -88,6 +88,7 @@ exports[`Block \`triangle="hide"\` 1`] = `
{ + styles: passedStyles = {}, circleSpacing, className = '', colorLabels = [] }) => { const styles = reactCSS(merge({ 'default': { card: { @@ -26,10 +26,11 @@ export const Circle = ({ width, onChange, onSwatchHover, colors, hex, circleSize return (
- { map(colors, c => ( + { map(colors, (c, i) => ( { + circleSize, circleSpacing, label }) => { const styles = reactCSS({ 'default': { swatch: { @@ -39,6 +39,7 @@ export const CircleSwatch = ({ color, onClick, onSwatchHover, hover, active,
{}, onHover, title = color, - children, focus, focusStyle = {} }) => { + children, focus, focusStyle = {}, label }) => { const transparent = color === 'transparent' const styles = reactCSS({ default: { @@ -38,8 +38,10 @@ export const Swatch = ({ color, style, onClick = () => {}, onHover, title = colo style={ styles.swatch } onClick={ handleClick } title={ title } + role="button" tabIndex={ 0 } onKeyDown={ handleKeyDown } + {...(label && {'aria-label': label })} { ...optionalEvents } > { children } diff --git a/src/components/common/__snapshots__/spec.js.snap b/src/components/common/__snapshots__/spec.js.snap index 4e3878ff..147c113f 100644 --- a/src/components/common/__snapshots__/spec.js.snap +++ b/src/components/common/__snapshots__/spec.js.snap @@ -429,6 +429,7 @@ exports[`Swatch renders correctly 1`] = `