Skip to content

fix: AccordionTrigger className should append, not replace#2481

Open
Devil1716 wants to merge 1 commit into
dequelabs:developfrom
Devil1716:fix/2480-accordion-trigger-classname
Open

fix: AccordionTrigger className should append, not replace#2481
Devil1716 wants to merge 1 commit into
dequelabs:developfrom
Devil1716:fix/2480-accordion-trigger-classname

Conversation

@Devil1716

Copy link
Copy Markdown

Summary

  • AccordionTrigger's className was applied before {...trigger.props}, so the custom class overwrote Accordion__trigger
  • Move the merged className after the spread so both Accordion__trigger and the consumer class are kept
  • Strengthen the unit test to assert Accordion__trigger, ExpandCollapse__trigger, and the custom class are all present

Closes #2480

Test plan

  • node scripts/buildIconTypes.js && pnpm exec jest src/components/Accordion/index.test.tsx --no-coverage (21 passed)

Apply the merged className after spreading trigger props so custom classes append instead of overwrite.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Devil1716
Devil1716 requested a review from a team as a code owner July 18, 2026 06:44
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@aws-amplify-us-east-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2481.d15792l1n26ww3.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AccordionTrigger: className prop replaces rather than appending

2 participants