Labels

Accessibility tests for form inputs and labels.

Example 1

Error: Input without a label or missing id.

Example 2

Error: Input with ID, although previous label does not have a for attribute.

Example 3

Warning: Input is using aria-label or aria-labelledby. Warn user to ensure there is a visible label.

Example 4

Pass: Input has id and label has corresponding for attribute.

Example 5

Warning: Input where type='reset'.

Example 6

Pass: Input where type='submit'

Example 7

Pass: Input where type='button'.

Example 8

Pass: Implicit labels. <label>First name: <input type="text"/><label>

Example 9

Fail: Implicit labels without text. <label><input type="text"/><label>

Example 10

Fail: Select without corresponding label.

Example 11

Fail: Textarea missing label.

Example 12

Pass: Textarea has label.

Example 13

Fail: Input where type="image" and doesn't have alt text or aria-label.

Example 14

Pass: Input has an "id" that that matches the "for" on a label, after the input.


Example 15

Pass: Input has title attribute for accessible name.