Skip to content

Commit cec68e7

Browse files
aferciaantpb
authored andcommitted
Make the color picker saturation control work with windows screen readers. (WordPress#10807)
1 parent db919fc commit cec68e7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/components/src/color-picker/saturation.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class Saturation extends Component {
150150
home: () => this.saturate( -1 ),
151151
};
152152

153-
/* eslint-disable jsx-a11y/no-static-element-interactions */
153+
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/no-noninteractive-element-interactions */
154154
return (
155155
<KeyboardShortcuts shortcuts={ shortcuts }>
156156
<div
@@ -159,7 +159,9 @@ export class Saturation extends Component {
159159
ref={ this.container }
160160
onMouseDown={ this.handleMouseDown }
161161
onTouchMove={ this.handleChange }
162-
onTouchStart={ this.handleChange }>
162+
onTouchStart={ this.handleChange }
163+
role="application"
164+
>
163165
<div className="components-color-picker__saturation-white" />
164166
<div className="components-color-picker__saturation-black" />
165167
<button
@@ -179,7 +181,7 @@ export class Saturation extends Component {
179181
</div>
180182
</KeyboardShortcuts>
181183
);
182-
/* eslint-enable jsx-a11y/no-static-element-interactions */
184+
/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/no-noninteractive-element-interactions */
183185
}
184186
}
185187

0 commit comments

Comments
 (0)