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

EDS TextField adds an aria-describedby for a non-existing item if there is no helper text #2469

Closed
wenche opened this issue Sep 7, 2022 · 2 comments · Fixed by #2639
Closed
Assignees
Labels
🐛 bug Something isn't working core-react eds-core-react

Comments

@wenche
Copy link
Contributor

wenche commented Sep 7, 2022

Describe the bug

We are using the TextField component with the multiline feature. Axe devtools reports an error regarding the aria-describedby. It seems like it is because the TextField component always adds an aria-describedby even if there is no helper text added.

Steps to reproduce the bug

  1. Create a TextField (multiline, no helperText)
  2. Use the inspector tool and notice that aria-describedby="eds-helpertext-number" is added even if this element doesn't exist

Expected behavior

Should not add aria-describedby for non-existing elements

Additional context
Skjermbilde 2022-09-07 kl  11 04 17

Skjermbilde 2022-09-07 kl  11 05 07

@wenche wenche added the 🐛 bug Something isn't working label Sep 7, 2022
@mimarz
Copy link
Contributor

mimarz commented Sep 7, 2022

Doh! Thanks for the notice.

We are currently re-writing all our "input" components, so we'll fix this in the "new" component.

Will be fixed by #2336

@mimarz mimarz added the core-react eds-core-react label Sep 7, 2022
@oddvernes oddvernes self-assigned this Nov 2, 2022
@oddvernes
Copy link
Collaborator

There was a bug in the inputwrapper so id was always set to null on the helpertext. I'll fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working core-react eds-core-react
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants