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

Warning text component uses redundant class #3553

Closed
querkmachine opened this issue Apr 26, 2023 · 0 comments · Fixed by #3569
Closed

Warning text component uses redundant class #3553

querkmachine opened this issue Apr 26, 2023 · 0 comments · Fixed by #3569

Comments

@querkmachine
Copy link
Member

querkmachine commented Apr 26, 2023

Cause

The Warning text component uses a bespoke .govuk-warning-text__assistive class for visually hiding text whilst keeping it available to assistive technologies such as screen readers.

This is identical to .govuk-visually-hidden, both in function and in the CSS used.

.govuk-warning-text__assistive doesn't provide any additional styles or functionality that .govuk-visually-hidden doesn't already.

Consequences

This is unnecessary duplication of CSS that can be resolved for a small performance benefit.

This was raised by a user on x-gov Slack on 24th March. They were confused as to why the warning text component had its own specific class for visually hidden content.

Impact of debt

Low

Reason (impact of debt)

Other than shipping some unnecessary code, this isn't detrimental to developers or end users.

Effort to pay down

Low

Reason (effort to pay down)

The code changes are fairly small: changing one class in HTML and removing some Sass code.

Overall rating

Low

Reason (overall rating)

As altering the HTML is necessary, this automatically constitutes a breaking change, however it is one that service teams should be able to resolve with little effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants