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

Refactor summary component to fix lighthouse test #3408

Merged
merged 11 commits into from
Nov 4, 2024

Conversation

rmccar
Copy link
Contributor

@rmccar rmccar commented Oct 28, 2024

What is the context of this PR?

Fixes: ONSdigital/design-team#219

Lighthouse tests on summary component are failing because there is more than one level of <div> inside the <dl> when only one level is valid before the <dt> and <dd> elements. This PR refactors the summary component so that there is only one <div> level between the <dl> and <dt> and <dd> elements. As part of this summary row titles needed to be changed from being marked up as a <div> to a <dt>.

The setting and testing of the ons-summary__row--has-values class was also removed as this class no longer seems to be used for anything.

How to review this PR

  • Check the lighthouse tests in the github actions and see that the result for the test for the hub and spoke examples is now at least 100.
  • Also run the test locally on this branch in chrome and on the main branch to see that this issue is now fixed

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

Copy link

netlify bot commented Oct 28, 2024

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit 7dee403
🔍 Latest deploy log https://app.netlify.com/sites/ons-design-system-preview/deploys/6724df91384e5500082ba4d5
😎 Deploy Preview https://deploy-preview-3408--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rmccar rmccar self-assigned this Oct 28, 2024
@rmccar rmccar added the Accessibility Issues discovered through accessibility testing label Oct 28, 2024
@rmccar rmccar force-pushed the refactor-summary-component-to-remove-extra-div-in-dl branch from 87d682a to 5c4d79d Compare October 28, 2024 09:30
@rmccar rmccar marked this pull request as ready for review October 28, 2024 12:13
@rmccar rmccar requested a review from a team October 28, 2024 12:50
@rmccar rmccar merged commit 777e059 into main Nov 4, 2024
28 checks passed
@rmccar rmccar deleted the refactor-summary-component-to-remove-extra-div-in-dl branch November 4, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Issues discovered through accessibility testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Fix Lighthouse failure - Summary
2 participants