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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

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 Jun 25, 2024 3:01pm
hds-website βœ… Ready (Inspect) Visit Preview Jun 25, 2024 3:01pm

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
Copy link
Member Author

alex-ju commented Jun 25, 2024

Rebased after #2181.

Copy link
Contributor

@andgen404 andgen404 left a comment

Choose a reason for hiding this comment

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

Visually Lgtm πŸŽ‰

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

7 participants