Merge pull request #571 from openedx/sajjad/VAN-548

fix: Add aria-Invalid="true" to error-state fields
This commit is contained in:
Syed Sajjad Hussain Shah
2022-05-11 11:00:49 +05:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ const FormGroup = (props) => {
as={props.as}
readOnly={props.readOnly}
type={props.type}
aria-invalid={props.errorMessage !== ''}
className="form-field"
autoComplete={props.autoComplete}
name={props.name}

View File

@@ -63,6 +63,7 @@ const PasswordField = (props) => {
type={isPasswordHidden ? 'password' : 'text'}
name={props.name}
value={props.value}
aria-invalid={props.errorMessage !== ''}
onFocus={handleFocus}
onBlur={handleBlur}
onChange={props.handleChange}