Skip to content

Commit b03fe54

Browse files
fix: Add aria-Invalid=true to invalid fields
1 parent 5fd6754 commit b03fe54

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/common-components/FormGroup.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const FormGroup = (props) => {
2626
as={props.as}
2727
readOnly={props.readOnly}
2828
type={props.type}
29+
aria-invalid={props.errorMessage !== ''}
2930
className="form-field"
3031
autoComplete={props.autoComplete}
3132
name={props.name}

src/common-components/PasswordField.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const PasswordField = (props) => {
6363
type={isPasswordHidden ? 'password' : 'text'}
6464
name={props.name}
6565
value={props.value}
66+
aria-invalid={props.errorMessage !== ''}
6667
onFocus={handleFocus}
6768
onBlur={handleBlur}
6869
onChange={props.handleChange}

0 commit comments

Comments
 (0)