I have a div that contains a number of dynamic form elements. I want a label to be read by screen readers upon entry of the div via tabbing, but the div itself is (and should be) unfocusable. Normally using a for attribute on the label or aria-describedby/aria-labeledby attribute on the first form element would allow for this behavior, but the form elements change dynamically during load so the first element is uncertain.
<label/> <%-- This should be read --%>
<div> <%-- When this div is entered during navigation with tabbing --%>
<dynamic form element 1>
...
<dynamic form element n>
</div>
Does anybody know of a way to produce this behavior via WIA-ARIA?
Alternatively, is there perhaps a way to use javascript to pull the first element under the div and dynamically add the necessary for/aria attributes?