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-on-this-page: Rewrite to use ul instead of dl for list of links #1346

Merged
merged 12 commits into from
Oct 3, 2024

Conversation

Andrew565
Copy link
Contributor

@Andrew565 Andrew565 commented Sep 27, 2024

Chromatic

https://1998-on-this-page-rewrite--65a6e2ed2314f7b8f98609d8.chromatic.com


Description

Closes #1998

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

Before:
Screenshot 2024-09-27 at 12 41 48 PM
After:
Screenshot 2024-10-02 at 11 10 15 AM

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)

@Andrew565 Andrew565 added the minor For a minor Semantic Version change label Sep 27, 2024
@Andrew565 Andrew565 self-assigned this Sep 27, 2024
@Andrew565 Andrew565 requested a review from a team as a code owner September 27, 2024 16:42
))}
</dd>
</dl>
</li>
Copy link
Contributor

@jamigibbs jamigibbs Sep 27, 2024

Choose a reason for hiding this comment

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

Are there tests that this markup change will affect in vets-website?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is one test that looks for this component: vets-website/src/applications/sco/tests/accessibility.cypress.spec.js, but the test is structured in such a way that it should still work with this re-write.

It's worth noting that there are currently 5 pages that have "fake component" versions of the va-on-this-page that all still use the dl/dd combo to display links and should probably be converted:

  1. vets-website/src/applications/combined-debt-portal/debt-letters/components/DebtDetailsOnThisPageLinks.jsx
  2. vets-website/src/applications/combined-debt-portal/debt-letters/components/OnThisPageLinks.jsx
  3. vets-website/src/applications/combined-debt-portal/medical-copays/components/OnThisPageDetails.jsx
  4. vets-website/src/applications/combined-debt-portal/medical-copays/components/OnThisPageOverview.jsx
  5. vets-website/src/applications/combined-debt-portal/medical-copays/components/OnThisPageStatements.jsx

I'll write these up in a separate ticket for after this component ships.

@jamigibbs jamigibbs requested review from a team and rsmithadhoc September 30, 2024 19:35
@danbrady danbrady self-requested a review October 2, 2024 13:12
@danbrady
Copy link
Contributor

danbrady commented Oct 2, 2024

@Andrew565 If the link wraps, can we have the second line align with the first like it is in "before"?

image

@Andrew565
Copy link
Contributor Author

@danbrady Ready for re-review, updated the "after" screenshot at the top.

Copy link
Contributor

@danbrady danbrady left a comment

Choose a reason for hiding this comment

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

LGTM! (And thanks for fixing the vertical alignment of the icon too!)

padding: 0.5em;
max-width: 372px;

Choose a reason for hiding this comment

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

@Andrew565 Would you be able to revert the width back to the original? My apologies for adding that feedback to this ticket. I talked to Carol about the issue she was able to move the ticket (#951) to address the width to Sprint 13 so we can address the width then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Andrew565 Andrew565 merged commit 2a2676c into main Oct 3, 2024
8 checks passed
@Andrew565 Andrew565 deleted the 1998-on-this-page-rewrite branch October 3, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor For a minor Semantic Version change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect role on <dd> element on "On this page" component
5 participants