You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: