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

[TextField] helperText accessibility #14231

Closed
2 tasks done
ghost opened this issue Jan 18, 2019 · 4 comments
Closed
2 tasks done

[TextField] helperText accessibility #14231

ghost opened this issue Jan 18, 2019 · 4 comments
Labels
accessibility a11y component: text field This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@ghost
Copy link

ghost commented Jan 18, 2019

<TextField /> property helperText is not accessible. I believe aria-describedby should be applied to the InputElement and not to the FormControl 🤔

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Using the macOS Mojave screenreader, I should hear the helper text read aloud.

Current Behavior

I am not hearing the helperText

Steps to Reproduce 🕹

This behavior is evident in the TextField demos. The error text is not read aloud.

Context 🔦

I am trying to help users smoothly navigate a signup flow with various password creation requirements.

Your Environment 🌎

Tech Version
Material-UI v3.9.0
React v16.7.0
Browser Chrome
TypeScript Not in use
@oliviertassinari
Copy link
Member

@enagy-earnup I think that you are right: https://www.w3.org/TR/WCAG20-TECHS/ARIA21.html. How do you think that we should solve the issue? Fix the demos with a documentation section on the accessible error messages?

@mlenser
Copy link
Contributor

mlenser commented Jan 22, 2019

@oliviertassinari moving the aria-describedby to the input solves the accessibility issue - I just tested it with NVDA with the button demos and moving the aria tag via DOM editor.

Isn't this an issue that needs to be solved in the TextField component?

Suggestion:
https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/TextField/TextField.js#L139 needs to be moved to the Select on line 153 and added to the InputElement on line 114.

@oliviertassinari oliviertassinari added accessibility a11y good first issue Great for first contributions. Enable to learn the contribution process. labels Jan 22, 2019
@oliviertassinari
Copy link
Member

oliviertassinari commented Jan 22, 2019

@mlenser Yes, I think that you are right. We should push #9617 one step further. Do you want to open a pull-request? :) Also, it would be great to add an Accessibility section to the documentation for the textfield!

@oliviertassinari oliviertassinari added the component: text field This is the name of the generic UI component, not the React module! label Jan 22, 2019
@mlenser
Copy link
Contributor

mlenser commented Jan 22, 2019

@oliviertassinari ya, I'll send a PR to fix this, assuming I can set up the repo. I'll investigate now.

I've only briefly dove into material-ui's accessibility so probably best for someone who knows the whole scope to document what has been done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y component: text field This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

No branches or pull requests

2 participants