GOV.UK Frontend v3.8.0
New features
The secondary text colour is now darker
$govuk-secondary-text-colour
and govuk-colour("dark-grey")
are now darker so users can more clearly read hint text that uses the colour.
The colour now has a contrast ratio of 7:1 against a white background, and helps hint text meet the WCAG 2.1 (AAA) accessibility standard.
This was added in pull request #1827: Make dark grey darker.
Error styling for field border thickness is now the same with and without an error
The error styling for the:
- text input, select and textarea components no longer makes the border thicker
- file upload component no longer includes a border around the file upload input
This means it’s easier for users to tell the difference between a field with an error and a field that's focused.
When an error message is about several fields, make sure you're clear which field has the error. You must not rely on users being able to tell which field has the error styling.
This was added in pull request #1870: Reduce border width of form inputs in the error state.
Set spellcheck with a new option
You can now turn spellcheck on or off in the input, textarea and character count components using the new spellcheck
option instead of the attributes
option.
For example:
{{ govukInput({
spellcheck: true
}) }}
This was added in pull requests:
Deprecated features
$govuk-border-width-form-element-error
From GOV.UK Frontend v4.0.0, you'll no longer be able to reference the $govuk-border-width-form-element-error
Sass setting.
Change any references to $govuk-border-width-form-element-error
in your Sass code so they reference $govuk-border-width-form-element
instead.
This was changed in pull request #1870: Reduce border width of form inputs in the error state.
Fixes
We’ve made fixes to GOV.UK Frontend in the following pull requests:
- #1838: Correctly camel case SVG attributes in the header and footer
- #1842: Preserve the state of conditional reveals when navigating 'back' in the browser
- #1848: Preserve the state of the character count when navigating 'back' in the browser
- #1855: Hint component can render block-level elements as valid HTML
- #1861: Fix the display of checkboxes when border-box box sizing is applied globally
- #1862: Fix display of warning text icon when border-box box sizing is applied globally #1862
- #1879: Explicitly set outline-offset to remove 1px transparent border in chrome v84