Some inputs (e.g., mobile number, email, password) on the Create and Account page show "invalid user entry: false" in the accessibility inspector when the input is marked with an error visually. It appears that these are being marked as invalid using the invalid attribute; however, this is not a supported HTML attribute. Instead, aria-invalid="true" should be used on inputs with invalid user entry. (Text which is not a valid email in the email input does appear as "invalid user entry: true" in the accessibility inspector, but that is because browsers can identify valid email addresses and will communicate that programmatically. aria-invalid="true" must still be used on this field, because a legitimate email address can still result in an error if it’s not from a valid GC domain.)
Potential fix
Fix our invalid attributes on the input component. Test with the a11y inspector
Description of issue
Some inputs (e.g., mobile number, email, password) on the Create and Account page show "invalid user entry: false" in the accessibility inspector when the input is marked with an error visually. It appears that these are being marked as invalid using the invalid attribute; however, this is not a supported HTML attribute. Instead, aria-invalid="true" should be used on inputs with invalid user entry. (Text which is not a valid email in the email input does appear as "invalid user entry: true" in the accessibility inspector, but that is because browsers can identify valid email addresses and will communicate that programmatically. aria-invalid="true" must still be used on this field, because a legitimate email address can still result in an error if it’s not from a valid GC domain.)
Potential fix