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

Remove unnecesary class from Warning Text component #3569

Merged
merged 1 commit into from May 2, 2023

Conversation

querkmachine
Copy link
Member

The govuk-warning-text__assistive class in the Warning Text component is redundant. It applies exactly the same styles as govuk-visually-hidden without any variation in code or purpose, and is not referenced by any JS functionality outside of tests.

This PR replaces the component's bespoke class with the global govuk-visually-hidden class.

As this is an alteration to the HTML, it's a breaking change for any users not using Nunjucks macros.

This is how the equivalent GOV.UK Elements component styled it. The bespoke class was added when the component was ported into the Design System, but it served the same purpose even then.

Closes #3553.

@querkmachine querkmachine added this to the v5.0 milestone May 2, 2023
@querkmachine querkmachine requested a review from a team May 2, 2023 11:50
@querkmachine querkmachine self-assigned this May 2, 2023
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3569 May 2, 2023 11:50 Inactive
@querkmachine querkmachine force-pushed the warning-text-remove-unnecessary-class branch from b452727 to e81138d Compare May 2, 2023 11:51
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3569 May 2, 2023 11:51 Inactive
@querkmachine querkmachine merged commit 3509a38 into main May 2, 2023
21 checks passed
@querkmachine querkmachine deleted the warning-text-remove-unnecessary-class branch May 2, 2023 13:15
@36degrees 36degrees removed this from the v5.0 milestone Jun 19, 2023
@romaricpascal romaricpascal mentioned this pull request Dec 8, 2023
jrmhaig added a commit to ministryofjustice/Claim-for-Crown-Court-Defence that referenced this pull request Feb 28, 2024
This class is replaced with govuk-visually-hidden.

See alphagov/govuk-frontend#3569
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.

Warning text component uses redundant class
4 participants