Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a11y: Add alert role to alert message element #2335

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

krvpb024
Copy link

@krvpb024 krvpb024 commented Feb 5, 2024

Do you follow the guidelines?

Current alert message element without alert role won't be announced by screen readers unless screen reader users navigate on it.
For example: in login page, if a user type the wrong username or password, the user will be redirected to the same page and the alert message "Invalid username or password." shows. But the screen reader will only announce the login page is loaded and is focus on username input (because of the autofocus attribute.) The user won't know why they get back to the login page instead of the home page.
But if the alert message element has set the alert role, the screen reader will announce the message once the page loaded. The user can understand the situation better.

@fguillot fguillot merged commit 39368ec into miniflux:main Feb 6, 2024
15 checks passed
@krvpb024 krvpb024 deleted the alert_role branch February 6, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants