Skip to content

Latest commit

 

History

History
executable file
·
125 lines (87 loc) · 3.9 KB

File metadata and controls

executable file
·
125 lines (87 loc) · 3.9 KB
id 5f99a7
name ARIA attribute is defined in WAI-ARIA
rules_format 1.1
rule_type atomic
description This rule checks that each `aria-` attribute specified is defined in ARIA 1.2.
accessibility_requirements
wcag20:1.3.1 wcag20:4.1.2
secondary
This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion.
secondary
This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion.
input_aspects
DOM Tree
acknowledgments
authors funding
Jey Nandakumar
WAI-Tools

Applicability

This rule applies to any attribute that starts with aria-.

Expectation

Each target attribute is defined in WAI-ARIA Specifications.

Background

The presence of unknown ARIA attributes is often the result of a typo or other developer error. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing.

Assumptions

There are no assumptions.

Accessibility Support

There are no accessibility support issues known.

Bibliography

Examples

Passed

Passed Example 1

This article element has an aria-atomic attribute which is defined in WAI-ARIA Specifications.

<article aria-atomic="true">This is a description of something cool...</article>

Passed Example 2

This div element with a role of dialog has an aria-modal attribute which is defined in WAI-ARIA Specifications.

<div role="dialog" aria-modal="true" aria-label="Modal title">Contains modal content...</div>

Passed Example 3

This div element with a role of textbox has multiple aria- attributes which are defined in WAI-ARIA Specifications.

<div
	role="textbox"
	contenteditable="true"
	aria-multiline="true"
	aria-label="Enter your hobbies"
	aria-required="true"
></div>

Passed Example 4

This input element with a type of number has multiple aria- attributes specified which are all defined in WAI-ARIA Specifications.

<label for="spinbutton">Enter a number between 0 and 100:</label>
<input id="spinbutton" aria-valuemax="100" aria-valuemin="0" aria-valuenow="25" type="number" value="25" />

Failed

Failed Example 1

This div element with a role of checkbox has an aria-not-checked attribute which is not defined in WAI-ARIA Specifications.

<div role="checkbox" aria-not-checked="true">All conditions are met</div>

Failed Example 2

This div element with a role of searchbox has an aria-labelled attribute (instead of aria-labelledby) which is not defined in WAI-ARIA Specifications.

<span id="label">Birthday:</span>
<div contenteditable role="searchbox" aria-labelled="label" aria-placeholder="MM-DD-YYYY">
	01-01-2019
</div>

Inapplicable

Inapplicable Example 1

This canvas element does not have an aria- attribute specified.

<canvas> </canvas>