Open sdemjanenko opened 1 year ago
Though it's not explicitly called out in the W3 docs, it appears the aria-errormessage
attribute should take the place of the aria-description
attribute when the component is in an invalid state (i.e. aria-invalid="true"
). I have a branch that makes these changes in the InputBase comp, but I'm not entirely sure y'all's stance on overwriting user-assign props. Alternatively, I can render both attributes and do some tests with VoiceOver, but I thought I'd start by polling here.
Just following up on this. As of today, it doesn't look like aria-errormessage
has full browser support:
I agree with @blakenetz that support is not there yet.
Adrian Roselli wrote about exposing field errors in August and some of the findings are interesting. He also notes that some chromium browsers treat aria-describedby as a live region.
See active discussion about aria-errormessage support for NVDA which is open since 2018.
Duplicates
Latest version
Summary 💡
I noticed that the TextField component does not take advantage of the
aria-errormessage
attribute. In this exampleThe input that is rendered in the DOM has
aria-invalid="true"
andaria-describedby=":rl:-helper-text"
which points to<p id=":rl:-helper-text" ...>Must be at least 2 characters</p>
. It does not havearia-errormessage
attribute set. Please see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-errormessageExamples 🌈
No response
Motivation 🔦
No response