We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
clickable
1 parent bd4118c commit 0f483bdCopy full SHA for 0f483bd
1 file changed
src/components/inline_edit/inline_edit_form.tsx
@@ -332,10 +332,15 @@ export const EuiInlineEditForm: FunctionComponent<EuiInlineEditFormProps> = ({
332
readModeDescribedById,
333
readModeProps?.['aria-describedby']
334
)}
335
- onClick={(e: MouseEvent<HTMLButtonElement>) => {
336
- activateEditMode();
337
- readModeProps?.onClick?.(e);
338
- }}
+ onClick={
+ // `undefined` prevents screen readers from announcing "clickable" when the button is readonly
+ !isReadOnly
+ ? (e: MouseEvent<HTMLButtonElement>) => {
339
+ activateEditMode();
340
+ readModeProps?.onClick?.(e);
341
+ }
342
+ : undefined
343
344
>
345
{children(readModeValue)}
346
</EuiButtonEmpty>
0 commit comments