input type=search element test

Pass Criteria

Reference

Test si-001: Unlabelled input type="search"

Code

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

Test si-002: Input type="search" with aria-label

Aria-label should be used as accessible name

No accessible description.

Code

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

Test si-003: Input type="search" with aria-labelledby

p referenced by aria-labelledby

Aria-labelledby should be used as accessible name

No accessible description.

Code

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

Test si-004: Input type="search" with label

Label should be used as accessible name

No accessible description.

Code

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

Test si-005: Input type="search" with title attribute

Title should be used as accessible name

No accessible description.

Code

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

Test si-006: Input type="search" with aria-describedby

p referenced by aria-describedby

Aria-describedby should be used as accessible description

No accessible name.

Code

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

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

Note: placeholder and aria-placeholder are tested as part of the placeholder attribute test.