dequelabs / dequelabs/axe-core

Focus guards in floating-ui cause an aXe violation

Open
#4,832 3 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.0

### Latest Version

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

### Issue Description

#### Expectation

aXe should only report actual problems. Focus guards in libs like floating-ui should not cause an aXe violation.

#### Actual

Focus guards that use `tabIndex=0` while being `aria-hidden=true` cause an aXe violation:

> Focusable content should have `tabindex="-1"` or be removed from DOM

#### How to Reproduce

Show a tooltip with floating-ui, or alternatively add focus guards manually:

```

```

#### Additional context

see https://github.com/floating-ui/floating-ui/discussions/3364

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.