Duplicates
Latest version
Current behavior 😯
In updating to Material-UI v5.2.2 (from v5.0.6) I have noticed what appears to be a regression related to accessibility in the <Chip> component. It looks like the underlying <div><span> created by the component only designates the component as disabled via CSS class .Mui-disabled.
This does not pass an automated a11y test using Jest's expect(chipComponent).toHaveAttribute("aria-disabled");
Expected behavior 🤔
Previously (last tested MUIv5.0.6 & v4.12.2), a disabled <Chip> component was marked disabled using the accessible aria-disabled attribute
Steps to reproduce 🕹
Steps:
(Tested in Jest tests and in latest Chrome browser on MacOS)
- Install MUI v5.2.2
- Render a disabled chip,
<Chip disabled .../>
- Inspect DOM element created by Chip. There is no
aria-disabled="true" attribute
- To compare, install MUI <= 5.0.6 or v4, perform steps 2-3 and there should be an
aria-disabled="true" attribute
Context 🔦
I am using Chip components to display some status information and need to differentiate some information as disabled. I need this to be accessible so it's clear to all users what is applicable or not.
Note: These are Basic informational/non-interactive Chips, I am not using actions, deletion, etc.
Your environment 🌎
`npx @mui/envinfo`
@emotion/react: ^11.7.0 => 11.7.0
@emotion/styled: ^11.6.0 => 11.6.0
@mui/base: 5.0.0-alpha.58
@mui/icons-material: ^5.2.0 => 5.2.0
@mui/lab: ^5.0.0-alpha.58 => 5.0.0-alpha.58
@mui/material: ^5.2.2 => 5.2.2
@mui/private-theming: 5.2.2
@mui/styled-engine: 5.2.0
@mui/styles: ^5.2.2 => 5.2.2
@mui/system: 5.2.2
@mui/types: 7.1.0
@mui/utils: 5.2.2
@types/react: ^17.0.37 => 17.0.37
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
typescript: ~4.5.2 => 4.5.2
Duplicates
Latest version
Current behavior 😯
In updating to Material-UI v5.2.2 (from v5.0.6) I have noticed what appears to be a regression related to accessibility in the
<Chip>component. It looks like the underlying<div><span>created by the component only designates the component as disabled via CSS class.Mui-disabled.This does not pass an automated a11y test using Jest's
expect(chipComponent).toHaveAttribute("aria-disabled");Expected behavior 🤔
Previously (last tested MUIv5.0.6 & v4.12.2), a disabled
<Chip>component was marked disabled using the accessiblearia-disabledattributeSteps to reproduce 🕹
Steps:
(Tested in Jest tests and in latest Chrome browser on MacOS)
<Chip disabled .../>aria-disabled="true"attributearia-disabled="true"attributeContext 🔦
I am using Chip components to display some status information and need to differentiate some information as disabled. I need this to be accessible so it's clear to all users what is applicable or not.
Note: These are Basic informational/non-interactive Chips, I am not using actions, deletion, etc.
Your environment 🌎
`npx @mui/envinfo`