input type=datetime-local element test

Pass Criteria

Reference

Test dli-001: Unlabelled input type="datetime-local"

Code

<input id="input1" type="datetime-local" />

Test dli-002: Input type="datetime-local" with aria-label

Aria-label should be used as accessible name

No accessible description.

Code

<input id="input2" type="datetime-local" aria-label="aria-label attribute" />

Test dli-003: Input type="datetime-local" with aria-labelledby

p referenced by aria-labelledby

Aria-labelledby should be used as accessible name

No accessible description.

Code

<p id="dli-003-labelledby">p referenced by aria-labelledby</p>
<input id="input3" type="datetime-local" aria-labelledby="dli-003-labelledby" />

Test dli-004: Input type="datetime-local" with label

Label should be used as accessible name

No accessible description.

Code

<label>label wrapping input <input id="input4" type="datetime-local" /></label>

Test dli-005: Input type="datetime-local" with title attribute

Title should be used as accessible name

No accessible description.

Code

<input id="input5" type="datetime-local" title="title attribute" />

Test dli-006: Input type="datetime-local" with aria-describedby

p referenced by aria-describedby

Aria-describedby should be used as accessible description

No accessible name.

Code

<input id="input6" type="datetime-local" aria-describedby="dli-006-describedby" />
<p id="dli-006-describedby">p referenced by aria-describedby</p>

Test dli-007: Input type="datetime-local" with label element & title attribute

Label should be used as accessible name

Title should be used as accessible description

Code

<label for="input7">label referenced by for/id attributes</label>
<input id="input7" type="datetime-local" title="title attribute" />