Skip to content

Commit

Permalink
fix(textfield): leverage aria-invalid attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Mar 29, 2021
1 parent 46e6a12 commit e718c0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/textfield/src/Textfield.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export class Textfield extends Focusable {
<!-- @ts-ignore -->
<textarea
aria-label=${this.label || this.placeholder}
aria-invalid=${ifDefined(this.invalid || undefined)}
id="input"
maxlength=${ifDefined(
this.maxlength > -1 ? this.maxlength : undefined
Expand Down Expand Up @@ -184,6 +185,7 @@ export class Textfield extends Focusable {
<input
type="text"
aria-label=${this.label || this.placeholder}
aria-invalid=${ifDefined(this.invalid || undefined)}
id="input"
maxlength=${ifDefined(
this.maxlength > -1 ? this.maxlength : undefined
Expand Down

0 comments on commit e718c0a

Please sign in to comment.