input type=number element

Pass Criteria

Reference

Test ni-001: Unlabelled input type="number"

Code

<input id="input1" type="number" />

Test ni-002: Input type="number" with aria-label

Aria-label should be used as accessible name

No accessible description.

Code

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

Test ni-003: Input type="number" with aria-labelledby

p referenced by aria-labelledby

Aria-labelledby should be used as accessible name

No accessible description.

Code

<p id="ni-003-labelledby">p referenced by aria-labelledby</p>
<input id="input3" type="number" aria-labelledby="ni-003-labelledby" />

Test ni-004: Input type="number" with label

Label should be used as accessible name

No accessible description.

Code

<label>label wrapping input <input id="input4" type="number" /></label>

Test ni-005: Input type="number" with title attribute

Title should be used as accessible name

No accessible description.

Code

<input id="input5" type="number" title="title attribute" />

Test ni-006: Input type="number" with aria-describedby

p referenced by aria-describedby

Aria-describedby should be used as accessible description

No accessible name.

Code

<input id="input6" type="number" aria-describedby="ni-006-describedby" />
<p id="ni-006-describedby">p referenced by aria-describedby</p>

Test ni-007: Input type="number" 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="number" title="title attribute" />