-
Notifications
You must be signed in to change notification settings - Fork 156
chore(*): Add aria-describedby reference to error message element as … #12051
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
Conversation
…well since readers are more likely to read it than aria-errormessage.
| } | ||
| /** @hidden @internal */ | ||
| @HostBinding('attr.aria-describedby') | ||
| public get describeBy() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS: There's also a describedby in the row templates
…r. Also remove aria-errormessage since it's not supported.
|
This does work with MacOS VoiceOver and NVDA. |
|
@damyanpetev I think it reads better when there's no aria-describedby on the cell that point to the header (does not repeat the header twice in NVDA) but it might be a breaking change since there are some tests that explicitly expect the old describedby attribute. Should we remove it or just set both the error and the header ref for describedby? |
Actually it also seem to depend on the browser and reader.
So I guess it's better to go with both so that there's no breaking change and the header is read at least once on every browser/reader. |
damyanpetev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…well since readers are more likely to read it than aria-errormessage.
Note: Works with more advanced readers like NVDA. More basic ones like the built-in win Narrator don't seem to read it though.
Closes #12043
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)