Reputation: 956
Is it usable to put an aria-describedby on a div containing an input?
(Instead of just putting it on the input.)
<p id="description">Description of input</p>
<div aria-describedby="description">
<input type="text">
<input type="text">
<input type="text">
</div>
Update:
As Steve Faulkner said below, this can be done by putting a role="group" and an aria-labelledby attribute on the div. This achieves basically the same thing as fieldset-legend would. The advantage is: You can seperate the "legend" from the "fieldset". If that is not necessary, it is probably best to stick with the regular fieldset-legend.
In the link below this technique is explained:
Using grouping roles to identify related form controls
If you want to make use of both description and a label ( with role="application" ), see link below:
Using the aria-describedby attribute
Upvotes: 1
Views: 1199
Reputation: 2640
This will not work as expected, for a few reasons:
Upvotes: 1