Skip to content

Commit

Permalink
[EuiValidatableControl] Add aria-invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos committed Mar 22, 2022
1 parent 2bfd32e commit d723d95
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src-docs/src/views/form_controls/form_controls_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export const FormControlsExample = {
<EuiSpacer />

<p>
<strong>Placeholders</strong> should never replace a label but used as
<strong>Placeholders should never replace a label</strong> but used as
a hint in addition to the label. Use the{' '}
<EuiCode>placeholder</EuiCode> prop to describe the expected value of
the input.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@ export const EuiValidatableControl: FunctionComponent<

return cloneElement(child, {
ref: replacedRef,
'aria-invalid': isInvalid,
});
};
1 change: 1 addition & 0 deletions src/components/suggest/__snapshots__/suggest.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ Array [
<input
aria-activedescendant=""
aria-haspopup="listbox"
aria-invalid="true"
aria-label="aria-label"
autocomplete="off"
class="euiFieldSearch euiFormControlLayout--2icons euiFieldSearch--compressed euiFieldSearch-isClearable euiFieldSearch-isInvalid euiSelectableSearch testClass1 testClass2"
Expand Down

0 comments on commit d723d95

Please sign in to comment.