Skip to content

[docs] Improve a11y for checkbox lists - #49111

Open
silviuaavram wants to merge 6 commits into
mui:masterfrom
silviuaavram:docs/improve-a11y-on-checkbox-lists
Open

[docs] Improve a11y for checkbox lists#49111
silviuaavram wants to merge 6 commits into
mui:masterfrom
silviuaavram:docs/improve-a11y-on-checkbox-lists

Conversation

@silviuaavram

@silviuaavram silviuaavram commented Sep 7, 2026

Copy link
Copy Markdown
Member

Fixes #34427.

Improve accessibility in the Checkbox List, Basic Transfer List, and Enhanced Transfer List demos by exposing each item's state on the focusable element.

  • Checkbox List: Make each row a labeled checkbox using role="checkbox" and aria-checked, and give comment buttons item-specific labels.
  • Basic Transfer List: Add accessible names to both lists and use listbox, option, aria-multiselectable, and aria-selected to expose selection.
  • Enhanced Transfer List: Apply the same listbox semantics and give each “select all” checkbox a label identifying its list.

Replace nested item checkboxes with decorative icons in all three demos. Update the documentation to explain checkbox interaction and transfer list accessibility, including the ARIA reference pattern, labeling, and focus management.

Copilot AI lite review requested due to automatic review settings September 7, 2026 17:10
@silviuaavram silviuaavram added docs Improvements or additions to the documentation. accessibility a11y scope: list Changes related to the list scope: transfer list Changes related to the transfer list. labels Sep 7, 2026
@silviuaavram
silviuaavram requested review from siriwatknp and removed request for Copilot September 7, 2026 17:11
@code-infra-dashboard

code-infra-dashboard Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@silviuaavram
silviuaavram force-pushed the docs/improve-a11y-on-checkbox-lists branch from 4aa14a0 to e39b344 Compare September 8, 2026 07:44
Copilot AI lite review requested due to automatic review settings September 8, 2026 07:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Transfer List demos now render role="menu" containers without accessible names, making it hard for assistive tech users to distinguish the two menus.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Improves accessibility of the Lists “Checkbox” demo and Transfer List demos by ensuring the interactive rows expose their checked state via ARIA and by updating the docs text to describe the new interaction model.

Changes:

  • Replace nested <Checkbox /> controls inside list rows with row-level role="checkbox" / role="menuitemcheckbox" + aria-checked, using checked/unchecked icons as the visual indicator.
  • Update Transfer List demos to use menu semantics for keyboard navigation and to expose selection state on each row.
  • Update Lists documentation copy to describe the new a11y behavior and interaction (row toggles on click/Space).
File summaries
File Description
docs/data/material/components/transfer-list/TransferList.tsx Uses menuitemcheckbox semantics and icons for selection state in the Transfer List demo.
docs/data/material/components/transfer-list/TransferList.js JS version of the same Transfer List a11y updates.
docs/data/material/components/transfer-list/SelectAllTransferList.tsx Uses menuitemcheckbox semantics and icons for selection state in the “Select All” Transfer List demo.
docs/data/material/components/transfer-list/SelectAllTransferList.js JS version of the same “Select All” Transfer List a11y updates.
docs/data/material/components/lists/lists.md Updates documentation text explaining the primary-action checkbox row behavior.
docs/data/material/components/lists/CheckboxList.tsx Converts the row to an ARIA checkbox and improves the comment button labeling.
docs/data/material/components/lists/CheckboxList.js JS version of the same Checkbox List demo updates.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/data/material/components/transfer-list/TransferList.js
Comment thread docs/data/material/components/transfer-list/TransferList.tsx
@silviuaavram
silviuaavram force-pushed the docs/improve-a11y-on-checkbox-lists branch from d6bd0f7 to adf384e Compare September 8, 2026 13:38

@mnajdova mnajdova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Checkbox example is narrated much better 👌

On the transfer list, when checking/unchecking there is no announcement, also it's kind a funny that it narrates to close the menu press escape, but nothing happens. Is there a better aria role we could use there?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The advertised ARIA model conflicts with the implementation, and the enhanced demo passes two unused accessibility props.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

docs/data/material/components/transfer-list/SelectAllTransferList.tsx:202

  • This second aria-label is also discarded by CustomList, so it has no effect on the rendered listbox. Remove it (and regenerate the JavaScript demo), or add and consume a corresponding prop in CustomList.
        aria-label="select all chosen"
  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread docs/data/material/components/transfer-list/SelectAllTransferList.tsx Outdated
Comment thread docs/data/material/components/transfer-list/TransferList.tsx
@silviuaavram
silviuaavram force-pushed the docs/improve-a11y-on-checkbox-lists branch from 4f76e08 to 6028de2 Compare September 10, 2026 07:53
@silviuaavram
silviuaavram requested review from mnajdova and a balanced review from Copilot September 10, 2026 07:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Transfer actions focus listbox containers without identifying an active option, and the generated enhanced demo contains dead props absent from its TypeScript source.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

docs/data/material/components/transfer-list/SelectAllTransferList.js:199

  • This second aria-label is also ignored by CustomList and has no TypeScript counterpart. Remove the dead prop so the generated JavaScript demo matches its TypeScript source (AGENTS.md:59-65).
        aria-label="select all chosen"
  • Files reviewed: 8/8 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread docs/data/material/components/transfer-list/TransferList.tsx
Comment thread docs/data/material/components/transfer-list/SelectAllTransferList.js Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Both transfer-list demos fail to restore focus when items are moved into an empty destination.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread docs/data/material/components/transfer-list/SelectAllTransferList.tsx Outdated
Comment thread docs/data/material/components/transfer-list/TransferList.tsx Outdated
@silviuaavram
silviuaavram force-pushed the docs/improve-a11y-on-checkbox-lists branch from b495d46 to 902f20e Compare September 10, 2026 08:16
@silviuaavram
silviuaavram force-pushed the docs/improve-a11y-on-checkbox-lists branch from 902f20e to 1418596 Compare September 11, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y docs Improvements or additions to the documentation. scope: list Changes related to the list scope: transfer list Changes related to the transfer list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ListItem checkbox not spoken by screenreader (WCAG)

3 participants