cds-snc / notification-planning

Project planning for GC Notify Team
5 stars 0 forks source link

Invalid inputs are using wrong "invalid" attribute. Error Identification #1464

Closed amazingphilippe closed 6 months ago

amazingphilippe commented 9 months ago

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.)

Capture d’écran, le 2024-01-03 à 15.52.16.png

Potential fix

amazingphilippe commented 6 months ago

This has been fixed: Capture d’écran, le 2024-03-20 à 15.22.26.png