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

Card - Add tag argument (HDS-4688) #2787

Merged
merged 4 commits into from
Apr 2, 2025
Merged

Conversation

KristinLBradley
Copy link
Contributor

@KristinLBradley KristinLBradley commented Mar 24, 2025

📌 Summary

If merged, this PR adds a tag argument to the Card component with accompanying Showcase example and tests.

Showcase: https://hds-showcase-git-hds-4688-add-card-tag-arg-hashicorp.vercel.app/components/card#tag

See related PR for docs: #2805

🛠️ Detailed description

  • Adds @tag argument to Card allowing choice of div (the default) or li tags.
  • Adds example to Showcase comparing default div tag to using an li tag.
  • Adds integration tests for @tag argument

🔗 External links


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Mar 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Apr 2, 2025 4:59pm
hds-website ✅ Ready (Inspect) Visit Preview Apr 2, 2025 4:59pm

@MelSumner
Copy link
Contributor

A couple of notes:

  1. Make sure to add a note that if the consumer uses the li tag, they need to wrap it in a ul element.
  2. We'll probably want to make sure to do that on the showcase as well, so a11y tests won't fail
  3. Please make sure to run the linter and/or a11y tests locally, just to catch whether or not the ul is working as intended.
  4. The a11y section of the docs may need to be updated to conditionally conformant since the consumer is responsible for wrapping the cards in a ul element.

dchyun
dchyun previously approved these changes Apr 1, 2025
dchyun
dchyun previously approved these changes Apr 2, 2025
Copy link
Contributor

@shleewhite shleewhite 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 making these changes!

@KristinLBradley KristinLBradley merged commit 2cd7b9a into main Apr 2, 2025
16 checks passed
@KristinLBradley KristinLBradley deleted the hds-4688-add-card-tag-arg branch April 2, 2025 17:10
@hashibot-hds hashibot-hds mentioned this pull request Apr 2, 2025
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.

5 participants