-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Description
This might arguably be considered a bug, rather than a feature request, as a site built with Blazor is not correctly accessibility-enabled when built with the standard components. However, I'm listing this as a feature request for now, as maybe there are scenarios where accessibility is not a legal requirement.
The issue is that the InputText, InputDate, InputTextArea, InputNumber and InputSelect are not truly accessibility compliant at the moment, although they are very close. They would achieve better compliance if they emitted the aria-invalid attribute as part of the rendered HTML output.
aria-invalid is used by screen readers to identify to people with limited visual acuity that a field is not valid and needs to be changed.
The logic to achieve this is already present, because the controls already add CSS class modifiers to the <input>
element based on their validity, so I think extending the base component to additionally emit area-invalid should be a relatively easy change.
I can't see an easy way for a developer to modify this from outside of the component - additional attributes can't be used to achieve this, for example, as the attribute should only be output when the control is not valid.