Skip to content
WCAG 2 Test Rules

For developers of evaluation tools and test methodologies

About WCAG 2 Test Rules

Proposed aria-* attribute is defined in WAI-ARIA

Description

This rule checks that each aria- attribute specified is defined in ARIA 1.1.

Applicability

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

Expectation

Each target attribute is defined in WAI-ARIA Specifications.

Assumptions

There are currently no assumptions

Accessibility Support

There are no major accessibility support issues known for this rule.

Background

Accessibility Requirements Mapping

This rule is not required for conformance.

Input Aspects

The following aspects are required in using this rule.

Test Cases

Passed

Passed Example 1

Open in a new tab

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

Open in a new tab

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">Contains modal content...</div>

Passed Example 3

Open in a new tab

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

Open in a new tab

This input element with a role of spinbutton 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"
	role="spinbutton"
	aria-valuemax="100"
	aria-valuemin="0"
	aria-valuenow="25"
	type="number"
	value="25"
/>

Failed

Failed Example 1

Open in a new tab

This li element with a role of menuitemcheckbox has an aria-* attribute which is not defined in WAI-ARIA Specifications.

<ul>
	<li role="menuitemcheckbox" aria-not-checked="true">List Item</li>
</ul>

Failed Example 2

Open in a new tab

This div element with a role of searchbox has an aria-* attribute (aria-labelled) 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

Open in a new tab

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

<canvas> </canvas>

Glossary

Outcome

An outcome is a conclusion that comes from evaluating an ACT Rule on a test subject or one of its constituent test target. An outcome can be one of the three following types:

Note: A rule has one passed or failed outcome for every test target. When there are no test targets the rule has one inapplicable outcome. This means that each test subject will have one or more outcomes.

Note: Implementations using the EARL10-Schema can express the outcome with the outcome property. In addition to passed, failed and inapplicable, EARL 1.0 also defined an incomplete outcome. While this cannot be the outcome of an ACT Rule when applied in its entirety, it often happens that rules are only partially evaluated. For example, when applicability was automated, but the expectations have to be evaluated manually. Such “interim” results can be expressed with the incomplete outcome.

WAI-ARIA specifications

The WAI ARIA Specifications group both the WAI ARIA W3C Recommendation and ARIA modules, namely:

Note: depending on the type of content being evaluated, part of the specifications might be irrelevant and should be ignored.

Implementations

This section is not part of the official rule. It is populated dynamically and not accounted for in the change history or the last modified date.

Implementation Consistency Complete Report
Alfa Consistent Yes View Report
QualWeb Consistent Yes View Report
SortSite Consistent Yes View Report

Changelog

This is the first version of this ACT rule.

Back to Top

This is an unpublished draft preview that might include content that is not yet approved. The published website is at w3.org/WAI/.