RGAA 3.2016 - Rule 11.8.2

Summary

This test consists in checking whether each <optgroup> in a <select> tag has a "label" attribute.

Business description

Criterion

11.8

Test

11.8.2

Description

Dans chaque liste de choix (balise select), chaque regroupement d’items de liste (balise optgroup) possède-t-il un attribut label ?

Level

A

Technical description

Scope

Page

Decision level

Decidable

Algorithm

Selection

Set1

All the <optgroup> tags within a <select> tag (select optgroup)

Process

Test1

For each element of Set1, test the presence of a "label" attribute

For each occurence of false-result of Test1, raise a MessageA

MessageA : Optgroup without label
  • code : OptgroupWithoutLabel
  • status : Failed
  • parameter : tag name
  • present in source : yes

Analysis

Not Applicable

The page has no <optgroup> within a <select> tag (Set1)

Failed

At least one <optgroup> has no "label" attribute (Test1 returns false for at least one element).

Passed

All the <optgroup> tags have "label" attribute (Test1 returns true for all the elements of Set1).

TestCases

TestCases files for rule 11.8.2