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

Improve EuiDescribedFormGroup accessiblity #762

Closed
jen-huang opened this issue May 2, 2018 · 0 comments · Fixed by #2783
Closed

Improve EuiDescribedFormGroup accessiblity #762

jen-huang opened this issue May 2, 2018 · 0 comments · Fixed by #2783
Assignees

Comments

@jen-huang
Copy link
Contributor

jen-huang commented May 2, 2018

Context: #707 (comment)

In its current implementation, EuiDescribedFormGroup behaves like a fieldset and generates something like this (simplified):

<div role="group" aria-labelledby="generatedId-title" aria-describedby="generatedId">
  <EuiTitle id="generatedId-title" />
  <EuiText id="generatedId" />
  <EuiFormRow>
      <input />
  </EuiFormRow>
  <EuiFormRow>
      <input />
  </EuiFormRow>
  ...
</div>

If it only wraps around one form row, and the user specifies idAria and passes it to the form row, it becomes:

<div role="group" aria-labelledby="userId-title">
  <EuiTitle id="userId-title" />
  <EuiText id="userId" />
  <EuiFormRow>
      <input aria-describedby="userId" />
  </EuiFormRow>
</div>

Action items:

  • EuiText (description prop) is repeated twice by screen readers in the second example with one form row. Once when user is reading the page normally and again when user is inside the input field. Is this preventable?
  • EuiTitle (title prop) takes any type of node. Should this be restricted to only heading elements (h2, h3, etc)?
  • Review to make sure the aria props are correct.

References:
https://www.w3.org/WAI/tutorials/forms/grouping/#associating-related-controls-with-fieldset
https://www.w3.org/TR/wai-aria/#aria-describedby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants