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

va-checkbox | Add internal description slot #1487

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

Mottie
Copy link
Contributor

@Mottie Mottie commented Feb 7, 2025

Chromatic

https://102160-cb-slot--65a6e2ed2314f7b8f98609d8.chromatic.com

Description

Adding an internal description slot to the va-checkbox to allow adding formatted content inside a tiled checkbox to better match the design of our form's issue page (see screenshot):

  • Our app requires multiple lines and styled text inside the tile description, so a slot was the best fix
  • Moved the part="label" to a span that wraps the label to allow styling only the label text
  • Note: if a <p> is used inside the slot, the font doesn't match the other description content - I didn't see where in the CSS this was being set (see third example in screenshot)
  • Note 2: I noticed that if a description is added to va-checkbox, it prevents rendering of any slot="description" content.

See department-of-veterans-affairs/va.gov-team#102160

QA Checklist

  • Component maintains 1:1 parity with design mocks
  • Text is consistent with what's been provided in the mocks
  • Component behaves as expected across breakpoints
  • Accessibility expert has signed off on code changes (if applicable. If not applicable provide reason why)
  • Designer has signed off on changes (if applicable. If not applicable provide reason why)
  • Tab order and focus state work as expected
  • Changes have been tested against screen readers (if applicable. If not applicable provide reason why)
  • New components are covered by e2e tests; updates to existing components are covered by existing test suite
  • Changes have been tested in vets-website using Verdaccio (if applicable. If not applicable provide reason why)

Screenshots

Adding 'With Children' section to storybook with styled checkbox tiles

Acceptance criteria

  • QA checklist has been completed
  • Screenshots have been attached that cover desktop and mobile screens

Definition of done

  • Documentation has been updated, if applicable
  • A link has been provided to the originating GitHub issue (or connected to it via ZenHub)

@Mottie Mottie added the patch Patch change in semantic versioning label Feb 7, 2025
@Mottie Mottie self-assigned this Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Patch change in semantic versioning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant