we are trying to layout 3 columns of a form like the second row in the image below
The label text and form elements' can vary in size and type so it's proving difficult to align as required that works cross browser. We are trying a number of solutions and one possibility is having a separate row for the labels and a separate row for the input elements. We can then vertically align the labels to the bottom and align the input elements to the top.
Would it be enough for screen readers if we included the necessary 'for' and 'aria' attributes on the label to associate it to the input element even though the label and input element are not beside each other in the source ? Accessibility is something we must consider.
Thank you for any advice. Fiddle below
<div class="container_12" style="background:green;">
<div class="grid_4 lbl" >
<label for="firstName">TR 1 TD 1</label>
</div>
<div class="grid_4 lbl">
<label for="lastName" >Bonorum Fermentum Tortor Adipiscing Pharetra</label>
</div>
<div class="grid_4 lbl">
<label>Bonorum Fermentum Tortor Adipiscing Pharetra Bonorum Fermentum Tortor Adipiscing Pharetra</label>
</div>
<div class="clear"></div>
</div>
<div class="container_12" style="background:yellow;">
<div class="grid_4">
<input type="text" id="firstName"/>
</div>
<div class="grid_4"><textarea id="lastName"></textarea>
</div>
<div class="grid_4">
<input type="text" id="phone" />
</div>
</div>
.lbl
. – Jacques ジャック