placeholder attribute test

Pass Criteria

Reference

Test ph-001: Placeholder without label

Placeholder should be used as accessible name

Code

<input id="input1" type="text" placeholder="placeholder text" />

Test ph-002: Placeholder with label associated via for/id attributes

Placeholder should be used as accessible description

Code

<label for="input2">Label text:</label>
<input id="input2" type="text" placeholder="placeholder text" />

Test ph-003: Placeholder with label wrapping input

Placeholder should be used as accessible description

Code

<label>Label text:
	<input id="input3" type="text" placeholder="placeholder text" />
</label>

Test ph-004: Placeholder and title attributes

Placeholder should be used as accessible name

Code

<input id="input4" type="text" placeholder="placeholder text" title="title text" />

Test ph-005: Placeholder with aria-placeholder

Placeholder should be used as accessible name

Code

<input id="input5" type="text" placeholder="placeholder text" 
				               aria-placeholder="aria-placeholder text" />

Test ph-006: Empty placeholder with aria-placeholder

Aria-placeholder should be used as accessible name

Code

<input id="input6" type="text" placeholder="" 
				               aria-placeholder="aria-placeholder text" />