One of my colleagues is currently working on an ‘Arrivals’ widget/component to be included on a dashboard. Within the widget is to be an ‘Intended Arrival Date’ alongside an actual date.
At the moment, ‘Intended Arrival Date’ is contained in a
<div> element with a class attribute of
field-header on it. To me, that class name suggests that the element ought to have been a
<h2> , or whatever, but that doesn’t feel quite right, as it’s actually a form of label directly associated with the date alongside it.
<label> of course, should be associated with an
<input> so that’s not right either.
For accessibility reasons as much as anything, I’d like to that ‘Intended Arrival Date’ to be tied somehow to the date it’s related to, other than by proximity. Is there way of marking them up in such a way with HTML that I’m missing?