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

Accordion - add @isStatic, @type, and @size #2156

Merged
merged 33 commits into from
Jul 8, 2024
Merged

Conversation

alex-ju
Copy link
Member

@alex-ju alex-ju commented Jun 12, 2024

πŸ“Œ Summary

Accordion - add the following arguments:

  • @isStatic: false (default) or true
  • @type: card (default) or flush
  • @size: large, medium (default), or small

πŸ› οΈ Detailed description

We'll recommend users apply @type and @size at the Accordion level but in practice, they are forwarded at the Accordion::Item level as that's where they are needed.

We'll recommend isStatic be applied to the Accordion::Item as, based on the audit, it is always required for only some of the items in an accordion.

With so many variations I restructured the showcase quite a few times, trying to catch as many combinations as possible, but if you have advice for improvements please let me know.

Accessibility considerations

The target size for the accordion button (hds-accordion-item__button) when @containsInteractive is true is less than 24px (for medium and large), but we provide enough padding around the button following the WCAG guidance. However, the automated accessibility testing fails on these items (despite passing axe DevTools 4.9.1 in Chrome). I want to get @MelSumner's feedback before attempting to add an exception for these instances.

πŸ”— External links

Jira ticket: HDS-3302
Figma file


πŸ‘€ Component checklist

πŸ’¬ Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Jun 12, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
hds-showcase βœ… Ready (Inspect) Visit Preview Jul 8, 2024 3:57pm
hds-website βœ… Ready (Inspect) Visit Preview Jul 8, 2024 3:57pm

Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

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

Had a first pass and left a few comments.

packages/components/src/components/hds/accordion/index.ts Outdated Show resolved Hide resolved
packages/components/src/components/hds/accordion/types.ts Outdated Show resolved Hide resolved
packages/components/src/components/hds/accordion/index.ts Outdated Show resolved Hide resolved
packages/components/src/styles/components/accordion.scss Outdated Show resolved Hide resolved
packages/components/src/styles/components/accordion.scss Outdated Show resolved Hide resolved
packages/components/src/styles/components/accordion.scss Outdated Show resolved Hide resolved
packages/components/src/styles/components/accordion.scss Outdated Show resolved Hide resolved
packages/components/src/styles/components/accordion.scss Outdated Show resolved Hide resolved
@KristinLBradley

This comment was marked as resolved.

@alex-ju
Copy link
Member Author

alex-ju commented Jun 18, 2024

Question: Is the Accordion web documentation going to be updated in a separate PR?

Yes, we'll have a separate PR for the documentation updates.

@alex-ju alex-ju force-pushed the alex-ju/accordion-features branch from 673839d to 2304da4 Compare July 8, 2024 15:52
@alex-ju alex-ju merged commit 71f26e3 into main Jul 8, 2024
16 checks passed
@alex-ju alex-ju deleted the alex-ju/accordion-features branch July 8, 2024 16:03
This was referenced Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants