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">
	<code>p</code> referenced by <code>aria-labelledby</code>
</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">
	<code>p</code> referenced by <code>aria-describedby</code>
</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.