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

Aria Role should be configurable #214

Open
tkalmar opened this issue Dec 17, 2021 · 0 comments
Open

Aria Role should be configurable #214

tkalmar opened this issue Dec 17, 2021 · 0 comments

Comments

@tkalmar
Copy link

tkalmar commented Dec 17, 2021

The attributes set here are redundant.

Elements with the role status have an implicit aria-live value of polite and an implicit aria-atomic value of true.

It would be nice if one could change the role. For example for alerts it would be more suitable to set the role to alert
This would allow users of screen readers to get immediately get notified about the message.

my current workaround is:

const parent = error.el.parentElement;
parent?.setAttribute('role', 'alert');
parent?.setAttribute('aria-live', 'assertive');
parent?.setAttribute('aria-atomic', 'true');

The aria-live and aria-atomic are here also redundant but needed because of the initial set attributes.

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

No branches or pull requests

1 participant