dequelabs / dequelabs/axe-core

`input role="switch"` fails on `aria-allowed-role`

Open
#3,651 6 comments 0 reactions 0 assignees View on GitHub
linting
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 23h
Merged PRs (30d)
17

Description

### Product

axe Linter

### Product Version

v4.4.2

### Latest Version

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

### Issue Description

#### Expectation



Switch 1

should (I believe) be a valid aria configuration for a switch checkbox.

#### Actual

This code is flagged with

axe-linter (aria-allowed-role): Ensures role attribute has an appropriate value for the elementaxe-linter[dequeuniversity/aria-allowed-role](https://dequeuniversity.com/rules/axe/4.4/aria-allowed-role?application%3Daxe-linter)

#### How to Reproduce

demo.html:

```html




Switch 1

```

#### Additional context

![image](https://user-images.githubusercontent.com/498712/189076479-048fcaca-7d51-4161-a0f3-578c0723bf24.png)

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.