Remove redundant aria label for JS toast messages#19435
Merged
AdrienClairembault merged 3 commits intoglpi-project:mainfrom Apr 12, 2025
Merged
Remove redundant aria label for JS toast messages#19435AdrienClairembault merged 3 commits intoglpi-project:mainfrom
AdrienClairembault merged 3 commits intoglpi-project:mainfrom
Conversation
AdrienClairembault
approved these changes
Apr 11, 2025
Contributor
Author
|
Is there a reason the tests aren't just looking for an alert role element that contains the expected message rather than an alert with the entire message as its name? |
Contributor
|
I think the original issue that lead to this change is that there are two alerts on the page (if I remember correctly). |
Contributor
|
Should be good with your change tho, waiting for the CI to confirm. |
AdrienClairembault
approved these changes
Apr 11, 2025
Contributor
|
This PR has been is closed and has been automatically locked. Please open a new issue with all requested information for related bugs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist before requesting a review
Description
Noticed with Forms that HTML content wasn't handled properly for JS toast messages when using it in an aria-label attribute. It wasn't escaped, but also the label is completely redundant and would be annoying for screen reader users. Change was added in #19355.
The way it was, as soon as the message appeared the screen reader would announce:
Screenshots (if appropriate):