dequelabs / dequelabs/axe-core

aria-required-children gives a confusing message on presentational role conflict

Open
#4,833 0 comments 1 reaction 0 assignees View on GitHub
fix rule metadata support
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 23h
Merged PRs (30d)
17

Description

The following appropriately fails the aria-required-children, because despite the child having role=presentation, tabindex=-1 causes the element not to get skipped in the accessibility tree.

The message this results in is "Element has children which are not allowed: [role=presentation]" is misleading though. role=presentation is allowed, what's causing a problem here is tabindex.

```html




foo




```

**Expectatoin**: The message for this should be something like: "Element has presentational children which cannot be ignored because of [tabindex=-1]"

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.