Skip to content

Commit 1575034

Browse files
Merge pull request #571 from openedx/sajjad/VAN-548
fix: Add aria-Invalid="true" to error-state fields
2 parents 47fce8a + 922f1e2 commit 1575034

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)