# Accessibility for SplitDateTimeField

**URL:** <https://forum.djangoproject.com/t/accessibility-for-splitdatetimefield/6871>\
**Category:** Using Django\
**Created:** [March 3, 2021, 10:42pm UTC](https://forum.djangoproject.com/t/accessibility-for-splitdatetimefield/6871 "2021-03-03T22:42:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smithdc1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/smithdc1/32/23160_2.png) [@smithdc1](https://forum.djangoproject.com/u/smithdc1)\
**Post date:** [March 3, 2021, 10:42pm UTC](https://forum.djangoproject.com/t/accessibility-for-splitdatetimefield/6871/1 "2021-03-03T22:42:39Z")

</div>

Hi All,

Say I have a `SplitDateTimeField` in a form which I render in my template with `form.as_p`. I’ll end up with HTML that looks like this.

```
<p>
  <label for="id_default_form-datetime_field_0">Datetime field:</label> 
  <input type="text" name="default_form-datetime_field_0" value="2021-03-03" required="" id="id_default_form-datetime_field_0">
  <input type="text" name="default_form-datetime_field_1" value="22:10:38" required="" id="id_default_form-datetime_field_1">
</p>

```

This layout will fail accessibility tests (e.g. wave, axe) as the second input does not have an associated label. I’d really appreciate any thoughts on how to approach this issue. My googling skills come up a long way short of pointing me in the right direction.
