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

[Accessibility] Input/Select - wrapped error message within live region #312

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

Destinyyyy
Copy link
Contributor

@Destinyyyy Destinyyyy commented Sep 23, 2024

Description

Wrapped the error message within a parent with attribute aria-live="assertive" aria-live="polite" so that it gets announced by the screen reader

Update 1: Added similar wrapper to Select component

Github issue

@ddecrulle
Copy link
Collaborator

Hello, thank you for this Pull Request!

I noticed that the documentation includes an example using aria-live="assertive":

Screenshot 2024-09-23 at 13 00 03

However, in the playground (which is usually more up to date), I see it uses aria-live="polite":

Capture d’écran 2024-09-23 à 13 01 29

Link: Playground Example

In some accessibility reports I've received, it's recommended to use aria-live="polite", especially when multiple errors could appear on the same page.

What are your thoughts on this? Would it make sense to align with the polite option here?

@Destinyyyy
Copy link
Contributor Author

Hey @ddecrulle thanks for your reply,

I'm fine with your suggestion as long as the playground is the most up-to-date with the latest recommendations.

In the meantime, I also noticed that the Select component could benefit from a similar fix. Would you be okay with me including it in this PR?

@ddecrulle
Copy link
Collaborator

Hey @ddecrulle thanks for your reply,

I'm fine with your suggestion as long as the playground is the most up-to-date with the latest recommendations.

In the meantime, I also noticed that the Select component could benefit from a similar fix. Would you be okay with me including it in this PR?

Yes of course !

Copy link
Collaborator

@ddecrulle ddecrulle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merci beaucoup !

@Destinyyyy Destinyyyy changed the title [Accessibility] Input - wrapped error message within live region [Accessibility] Input/Select - wrapped error message within live region Sep 23, 2024
@ddecrulle ddecrulle merged commit 296de45 into codegouvfr:main Sep 23, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants