-
Notifications
You must be signed in to change notification settings - Fork 211
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
Set aria-labelledby & id attributes via JS #19
Comments
I vote against. This is unexpected behavior for the user and should not be done in js. If aria is not used by developers this is a different problem which should be tackled other way. |
Good points, @Schepp. Actually I think it is worth including a short note about changing the |
Although it is nice to have that extra a11y piece in place I would suggest setting aria-labelledby and the corresponding id on a dialog's header part via JavaScript.
Why? I expect most people to copy & paste dialog code and to forget to adjust id and aria attributes accordingly. Also I suspect most users of your modal lib will not have the background needed to identify this problem.
By moving this part to JS you ensure a much better a11y across the board.
The text was updated successfully, but these errors were encountered: