Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][Accordion] Render a heading wrapping AccordionSummary button per W3C Accordion Pattern standards #42914

Merged
merged 19 commits into from
Jul 27, 2024

Conversation

ZeeshanTamboli
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli commented Jul 12, 2024

Fixes #42891

Following the W3C Accordion Pattern, screen reader now announces correctly as:

button collapsed/expanded heading level 3

Previously, it announced as:

button collapsed/expanded


Docs previews:

Breaking change: https://deploy-preview-42914--material-ui.netlify.app/material-ui/migration/migrating-to-v6/#accordion


IMO, this change can be cherry-picked to v5 as it is not a breaking change.

@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work accessibility a11y component: accordion This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material needs cherry-pick The PR should be cherry-picked to master after merge labels Jul 12, 2024
@mui-bot
Copy link

mui-bot commented Jul 12, 2024

@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][Accordion] Render AccordionSummary as a heading wrapping a button per W3C Accordion Pattern standards [material-ui][Accordion] Render a heading wrapping AccordionSummary button per W3C Accordion Pattern standards Jul 12, 2024
@ZeeshanTamboli ZeeshanTamboli marked this pull request as ready for review July 12, 2024 10:54
Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @ZeeshanTamboli, sorry for the late reply.

This looks like a good addition 👍🏼

This might be considered a breaking change as it can break customizations relying on dom structure / specificity. What do you think @aarongarciah?

packages/mui-material/src/Accordion/Accordion.js Outdated Show resolved Hide resolved
@aarongarciah
Copy link
Member

@DiegoAndai yes, sadly, as of today, changes to the DOM structure of a component should be considered a breaking change.

@ZeeshanTamboli ZeeshanTamboli removed the needs cherry-pick The PR should be cherry-picked to master after merge label Jul 25, 2024
pnpm-lock.yaml Outdated
Copy link
Member Author

Choose a reason for hiding this comment

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

Had to run pnpm dedupe after merging with the latest next branch.

@aarongarciah
Copy link
Member

Since we consider this a breaking change, we need to add an entry in the v6 upgrade guide.

@ZeeshanTamboli
Copy link
Member Author

Since we consider this a breaking change, we need to add an entry in the v6 upgrade guide.

Added. https://deploy-preview-42914--material-ui.netlify.app/material-ui/migration/migrating-to-v6/#accordion.

Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

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

Looks good. I'll leave the final approval to @DiegoAndai

docs/data/material/components/accordion/accordion.md Outdated Show resolved Hide resolved
Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y breaking change bug 🐛 Something doesn't work component: accordion This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
5 participants