Accessibility: Error message on login page not announced to screen reader users #43659
Open
5 tasks done
Labels
focus: accessibility
The issue/PR is related to accessibility.
focus: my account
Issues related to my account page.
priority: normal
The issue/PR is of normal priority—not many people are affected or there’s a workaround, etc.
team: Proton
type: community contribution
Prerequisites
Describe the bug
On the login form on the My Account Page, error messages are not announced to screen reader users, though they appear visually on the page.
The page refreshes rather than submitting the form with ajax, and there is a visual error message but due to the refresh screen reader users are loaded at the top of the page and do not hear the message.
Form code:
https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/templates/global/form-login.php
This is likely related to #43635
Expected behavior
When a form error is present, there should be an auditory message for screen reader users to know that there was an error.
You can either do this by:
A) When the page reloads, set keyboard focus on the error message so it is read out. OR
B) Add an aria-live region on the status message and trigger it after the page loads.
You may also consider changing this form to submit with ajax so screen reader users are not sent to the top of the page as happens with a refresh.
Actual behavior
Screen reader users don't easily know when a an error occurs.
Steps to reproduce
WordPress Environment
N/A
Isolating the problem
The text was updated successfully, but these errors were encountered: