Skip to content

[CheckTree] aria-checked is not announced on native checkbox #4345

@yhy-1

Description

@yhy-1

What version of rsuite are you using?

v5.83.1

What version of React are you using?

Latest

What version of TypeScript are you using (if any)?

No response

What browser are you using?

Chrome

Describe the Bug

Current Behavior

RSuite components (e.g., CheckTree) render native checkboxes like this:

<input
  type="checkbox"
  aria-checked="mixed"
  tabindex="0"
  ...
/>

However, screen readers such as NVDA, JAWS, and VoiceOver do not announce the "partially checked" or "mixed" state when aria-checked="mixed" is applied directly to a native <input type="checkbox">.

Instead, the checkbox is announced as simply checked or unchecked, causing an accessibility issue.

Expected Behavior

Screen readers should announce the checkbox state as "partially checked" or "mixed" when aria-checked="mixed" is present.

To support this, either:

  • Use a custom checkbox element with role="checkbox" and aria-checked="mixed", or
  • If using a native checkbox (<input type="checkbox">), set the .indeterminate = true property via JavaScript.

To Reproduce

https://codesandbox.io/p/sandbox/8cqrdo

  1. Use keyboard or mouse to select only one of the child nodes under a parent.
  2. Turn on a screen reader (e.g., NVDA, JAWS, or VoiceOver).
2025-07-08_15-03-05.mp4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions