Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
698 changes: 698 additions & 0 deletions docs/data/material/components/chips/chips.a11y.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion docs/data/material/components/chips/chips.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@ gain depth while clicked or touched.

## Accessibility

If the Chip is deletable or clickable then it is a button in tab order. When the Chip is focused (for example when tabbing) releasing (`keyup` event) `Backspace` or `Delete` will call the `onDelete` handler while releasing `Escape` will blur the Chip.
If the Chip is deletable or clickable then it is a button in tab order. When the Chip is focused (for example when tabbing) releasing (`keyup` event) `Backspace` or `Delete` calls the `onDelete` handler.
After a deletion, move focus to the next chip or to a nearby control, because the deleted chip leaves the page.
To remove a disabled deletable Chip from the tab order, set `skipFocusWhenDisabled`.
77 changes: 41 additions & 36 deletions docs/data/material/getting-started/accessibility/accessibility.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions docs/data/material/getting-started/accessibility/knownGaps.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"Button",
"ButtonGroup",
"Checkbox",
"Chip",
{ "component": "Fab", "note": "the ring needs `disableFocusRipple`" },
{ "component": "IconButton", "note": "the ring needs `disableFocusRipple` too" },
"Radio",
Expand All @@ -21,6 +22,10 @@
"affected": [
"Avatar",
{ "component": "Button", "note": "`info`, `warning`; `error` in dark mode" },
{
"component": "Chip",
"note": "`info`, `warning`, focused or hovered `outlined`"
},
{ "component": "CircularProgress", "note": "`warning` with `enableTrackSlot`" },
{
"component": "Fab",
Expand Down Expand Up @@ -51,6 +56,30 @@
"affected": [{ "component": "ToggleButton", "note": "`primary`, `error`, `info`, `success`" }],
"workaround": "Add a non-color cue to the selected state, such as an icon"
},
{
"gap": "A Chip label does not wrap, so a long label ends with an ellipsis and hides text",
"criteria": ["1.4.10", "1.4.12"],
"affected": ["Chip"],
"workaround": "Let the label wrap with `height: 'auto'` and `whiteSpace: 'normal'`, as in the multiline demo"
},
{
"gap": "A deletable Chip does not expose its delete action, and a disabled delete-only Chip stays focusable and does not expose its disabled state",
"criteria": ["1.1.1", "4.1.2"],
"affected": [{ "component": "Chip", "note": "`onDelete`; delete-only ignores Enter, Space" }],
"workaround": "Describe the delete key with `aria-describedby`, and set `skipFocusWhenDisabled` on disabled chips"
},
{
"gap": "Deleting a Chip with the keyboard moves focus to the page body",
"criteria": ["2.4.3"],
"affected": [{ "component": "Chip", "note": "`onDelete`" }],
"workaround": "Move focus to the next chip, or to the input, in the `onDelete` handler"
},
{
"gap": "The Chip delete icon is smaller than 24 by 24 CSS px, and its contrast is below 3:1",
"criteria": ["1.4.11", "2.5.8"],
"affected": [{ "component": "Chip", "note": "16 px `small`, 22 px `medium`" }],
"workaround": "Enlarge the icon, and give it a darker color, with `sx` on `.MuiChip-deleteIcon`"
},
{
"gap": "The extended Fab has a fixed height, so a label that wraps can spill out of it",
"criteria": ["1.4.10", "1.4.12"],
Expand Down
Loading
Loading