Skip to content

[Checkbox] Indeterminate Checkbox Axe scan failure #49051

Description

@malouro

Steps to reproduce

Steps:

  1. Open this link to live example: https://recipes.mui.com/chat/edit-vvg-ZJosN9DmtHNWLe6H
  2. Run Axe scan on the page via the browser extension
  3. See reported findings, which fails "Ensure ARIA attributes are used as described in the specification of the element's role" regarding aria-checked most likely

Current behavior

Axe scan reports the following issue:

Ensure ARIA attributes are used as described in the specification of the element's role

[more information](https://dequeuniversity.com/rules/axe/4.12/aria-conditional-attr?application=AxeChrome)

Element Location:
iframe input[data-indeterminate="true"]
<input data-indeterminate="true" class="PrivateSwitchBase-input css-12xagqm-MuiSwitchBase-root" type="checkbox" aria-checked="mixed">

To solve this problem, you need to fix the following:
Remove aria-checked, or set it to "false" to match the real checkbox state

Expected behavior

should not have reported Axe violations

Context

No response

Your environment

npx @mui/envinfo

Ran an Axe scan in the code sandbox that links from the MUI demo page to test this. I cannot run npx in the sandbox.

It has the following installed:

    "@emotion/react": "^11.11.0",
    "@emotion/styled": "^11.11.0",
    "@mui/icons-material": "9.3.1",
    "@mui/material": "9.3.1",
    "react": "^19.0.0",
    "react-dom": "^19.0.0"

Search keywords: indeterminate,checkbox,axe,a11y

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions