Skip to content

Commit

Permalink
Merge pull request #20 from storybookjs/jsomsanith/fix/input_a11y_inv…
Browse files Browse the repository at this point in the history
…alid_attribute

fix: invalid input with aria-invalid attribute
  • Loading branch information
domyen authored Jun 18, 2019
2 parents f2d7144 + d5bf26f commit bd87902
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,13 @@ export function Input({
focused={focused}
>
{icon && <Icon icon={icon} aria-hidden />}
<InputText id={id} value={value} aria-describedby={errorId} {...props} />
<InputText
id={id}
value={value}
aria-describedby={errorId}
aria-invalid={!!error}
{...props}
/>
<Error id={errorId}>{error}</Error>
</InputWrapper>
</InputContainer>
Expand Down

0 comments on commit bd87902

Please sign in to comment.