-
Notifications
You must be signed in to change notification settings - Fork 862
Closed
Labels
Description
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(descriptionprop) 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(titleprop) takes any type of node. Should this be restricted to only heading elements (h2,h3, etc)?- Review to make sure the
ariaprops 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