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

Form elements that accept required don't set an A11y attribute on the child element #1167

Open
hergaiety opened this issue Sep 25, 2020 · 0 comments

Comments

@hergaiety
Copy link

Elements such as <PaperInput required={{true}} /> output html that shows validation messages and the label has a class of .md-required, but these do little for accessibility. Any form element that is required should pass through a required or aria-required="true" attribute into the element itself for A11y tools to be able to read. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-required_attribute

This should apply to Paper Input (including textarea={{true}}, Paper Autocomplete, Ember Select
Ideally Paper Radio Paper Switch and Paper Checkbox as well, but it seems some of that work is a work-in-progress #692


For now, a workaround can be done by doing the following:

<PaperInput
  @label="My Input"
  @required={{true}}
  @passThru={{hash
    required=true
  }} />
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