Warning text does not explicitly set font-weight #5279
Labels
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
small story
warning text
The warning text component doesn't explicitly set a font weight, instead assuming that
<strong>
will always be bold because of browser default styles:govuk-frontend/packages/govuk-frontend/src/govuk/components/warning-text/_index.scss
Lines 9 to 12 in a5a50ea
I think this was introduced in GOV.UK Frontend 5.0.0: 18caff5#diff-245553285fc1127f05c68705df40d7fdf95abebef3173eab71ea6b4d8bf89546
I think in almost all other places, Frontend is very careful to avoid relying on default styles.
<strong>
is a semantic element and the spec doesn't specify that user agents should render <strong> as bold, though it's a common convention.I happened to run into this on a project using the Meyer reset, where the warning text was rendering as
normal
weight, but it may also affect similar reset/normalise stylesheets.The text was updated successfully, but these errors were encountered: