dequelabs / dequelabs/axe-core

aria-errormessage value must use a technique to announce the message

Open
#4,911 8 comments 0 reactions 0 assignees View on GitHub
fix rules
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 23h
Merged PRs (30d)
17

Description

### Product

axe-core

### Product Version

4.10.3

### Latest Version

- [x] I have tested the issue with the latest version of the product

### Issue Description

#### Expectation

As described in the issue https://github.com/dequelabs/axe-core/issues/680 the spec says it is optional to have a live region for the referenced element, see https://w3c.github.io/aria/#aria-errormessage.

"Authors MAY call attention to a new error message with a live region by modifying inserting the error message into the contents of a existing, rendered element with a [live region role](https://w3c.github.io/aria/#live_region_roles), such as [alert](https://w3c.github.io/aria/#alert)."

Looking at https://caniuse.com/?search=aria-errormessage, it is available in most browsers. Therefore, I don't see the necessity to fall back to a live region or similar.

So, I wouldn't expect an issue like "aria-errormessage value must use a technique to announce the message" being reported by axe-core.
Or to have a separate rule for that, so I can exclude it easier.

#### Actual

Reports the issue "ARIA attributes must conform to valid values" (aria-valid-attr-value) with details:

aria-errormessage value `[...]` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)

#### How to Reproduce

Reference an element in "aria-errormessage" that is not a live region or similar.

#### Additional context
-

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.