diff --git a/src/common-components/AuthnValidationFormGroup.jsx b/src/common-components/AuthnValidationFormGroup.jsx
index 9a6bebc5..97f9c4ae 100644
--- a/src/common-components/AuthnValidationFormGroup.jsx
+++ b/src/common-components/AuthnValidationFormGroup.jsx
@@ -62,6 +62,7 @@ const AuthnCustomValidationFormGroup = (props) => {
type: props.type,
value: props.value,
className: props.inputFieldStyle,
+ 'aria-invalid': props.ariaInvalid,
};
inputProps.onChange = (e) => onChangeHandler(e, onChange);
inputProps.onClick = (e) => onClickHandler(e, onClick);
@@ -112,6 +113,7 @@ AuthnCustomValidationFormGroup.defaultProps = {
type: '',
value: '',
invalid: false,
+ ariaInvalid: false,
invalidMessage: '',
inputFieldStyle: '',
helpText: '',
@@ -134,6 +136,7 @@ AuthnCustomValidationFormGroup.propTypes = {
PropTypes.bool,
]),
invalid: PropTypes.bool,
+ ariaInvalid: PropTypes.bool,
invalidMessage: PropTypes.string,
helpText: PropTypes.string,
className: PropTypes.string,
diff --git a/src/forgot-password/ForgotPasswordPage.jsx b/src/forgot-password/ForgotPasswordPage.jsx
index 4a1f5ff1..6e13b100 100644
--- a/src/forgot-password/ForgotPasswordPage.jsx
+++ b/src/forgot-password/ForgotPasswordPage.jsx
@@ -110,6 +110,7 @@ const ForgotPasswordPage = (props) => {
name="email"
type="email"
invalid={validationError !== ''}
+ ariaInvalid={validationError !== ''}
invalidMessage={validationError}
value={values.email}
onBlur={() => getValidationMessage(values.email)}
diff --git a/src/forgot-password/tests/__snapshots__/ForgotPasswordPage.test.jsx.snap b/src/forgot-password/tests/__snapshots__/ForgotPasswordPage.test.jsx.snap
index d711d3c3..05844318 100644
--- a/src/forgot-password/tests/__snapshots__/ForgotPasswordPage.test.jsx.snap
+++ b/src/forgot-password/tests/__snapshots__/ForgotPasswordPage.test.jsx.snap
@@ -31,6 +31,7 @@ exports[`ForgotPasswordPage should match default section snapshot 1`] = `
this.setState({ password: e.target.value, isSubmitted: false })}
diff --git a/src/login/tests/__snapshots__/LoginPage.test.jsx.snap b/src/login/tests/__snapshots__/LoginPage.test.jsx.snap
index 65766837..599b2124 100644
--- a/src/login/tests/__snapshots__/LoginPage.test.jsx.snap
+++ b/src/login/tests/__snapshots__/LoginPage.test.jsx.snap
@@ -44,6 +44,7 @@ exports[`LoginPage should match TPA provider snapshot 1`] = `
this.handleOnBlur(e)}
@@ -487,6 +488,7 @@ class RegistrationPage extends React.Component {
type="text"
className="data-hj-suppress"
invalid={this.state.errors.username !== ''}
+ ariaInvalid={this.state.errors.username !== ''}
invalidMessage={this.state.errors.username}
value={this.state.username}
onBlur={(e) => this.handleOnBlur(e)}
@@ -501,6 +503,7 @@ class RegistrationPage extends React.Component {
type="text"
className="data-hj-suppress"
invalid={this.state.errors.email !== ''}
+ ariaInvalid={this.state.errors.email !== ''}
invalidMessage={this.state.errors.email}
value={this.state.email}
onBlur={(e) => this.handleOnBlur(e)}
@@ -515,6 +518,7 @@ class RegistrationPage extends React.Component {
name="password"
type="password"
invalid={this.state.errors.password !== ''}
+ ariaInvalid={this.state.errors.password !== ''}
invalidMessage={this.state.errors.password}
value={this.state.password}
onBlur={(e) => this.handleOnBlur(e)}
@@ -530,6 +534,7 @@ class RegistrationPage extends React.Component {
type="select"
key="country"
invalid={this.state.errors.country !== ''}
+ ariaInvalid={this.state.errors.country !== ''}
invalidMessage={intl.formatMessage(messages['country.validation.message'])}
className="mb-0 data-hj-suppress"
value={this.state.country}
diff --git a/src/register/tests/__snapshots__/RegistrationPage.test.jsx.snap b/src/register/tests/__snapshots__/RegistrationPage.test.jsx.snap
index 6c2eeb81..94825074 100644
--- a/src/register/tests/__snapshots__/RegistrationPage.test.jsx.snap
+++ b/src/register/tests/__snapshots__/RegistrationPage.test.jsx.snap
@@ -43,6 +43,7 @@ exports[`RegistrationPageTests should match TPA provider snapshot 1`] = `