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

Turn the WCAG 2.2 design elements into macros #4054

Merged
merged 3 commits into from
Aug 21, 2024
Merged

Conversation

owenatgov
Copy link
Contributor

What

Turns the WCAG 2.2 callouts and criteria notes linked to by the callouts into respective macros and replaces all instances of the callouts and notes in guidance with the macros.

Additionally, this PR fixes few missed duplicate content issues found in content, adjusts the classes used for the WCAG designs to be more specific to their function and moves the override of strong element styling when they're govuk tags into prose scope since we always want our tags to be regular font size.

Why

The WCAG 2.2 designs are repeated across 34 pages of content and we're effectively rebuilding them every time we use them. Turning them into macros makes the website lighter and our content less complex.

We've gone back and forth around if we want to do this since the designs are going to be removed eventually, however even if it's a few months, it's still worth doing for neatness and it makes these designs easier to repurpose in the future.

Notes

I'm not super happy with how I've managed inconsistencies between the callout content. The introType attribute feels a bit hacky but managable, however the override attributes which I'm only using for the images page feel messy. I'm not sure if there's a better alternative though and welcome suggestions from others on this.

@owenatgov owenatgov requested a review from a team August 20, 2024 10:59
Copy link

netlify bot commented Aug 20, 2024

You can preview this change here:

Name Link
🔨 Latest commit 9842464
🔍 Latest deploy log https://app.netlify.com/sites/govuk-design-system-preview/deploys/66c498bca64fd000089c59cd
😎 Deploy Preview https://deploy-preview-4054--govuk-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.

Copy link
Member

@querkmachine querkmachine left a comment

Choose a reason for hiding this comment

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

🦾

Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

Looking pretty neat! Dropped a couple of suggestions around the API for the component, but they're only that, I'd be fine with a merge in this state as well 😊

@owenatgov
Copy link
Contributor Author

@querkmachine @romaricpascal I've addressed both your comments. Whilst you've both already approved, to be belt and bracers could I get one of you to sus this out one more time?

@owenatgov owenatgov merged commit 989bf3e into main Aug 21, 2024
15 checks passed
@owenatgov owenatgov deleted the wcag-callout-macro branch August 21, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants