From f3ef6e9b4e99fcf308eb062a406515f2a4ac3f62 Mon Sep 17 00:00:00 2001 From: Nick Colley Date: Fri, 19 Aug 2022 15:40:31 +0100 Subject: [PATCH 1/2] Improve pagination print styles By default `.govuk-link` print styles will output the `href` attribute in brackets after the link. For example: "Home (/homepage)". This is done with the `::after` pseudo selector. So when this was styled to increase the touch area of the pagination link it resulted in the bracketed information overlapping the component in a difficult to read way. By only applying this touch area improvement in the `screen` media context we avoid overwriting this inherited print style and allow the default `.govuk-link` behaviour to apply as usual. --- src/govuk/components/pagination/_index.scss | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/govuk/components/pagination/_index.scss b/src/govuk/components/pagination/_index.scss index 9d99c3d824..321a5b5455 100644 --- a/src/govuk/components/pagination/_index.scss +++ b/src/govuk/components/pagination/_index.scss @@ -106,13 +106,16 @@ display: block; min-width: govuk-spacing(3); - &:after { - content: ""; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; + // Increase the touch area for the link to the parent element. + @media screen { + &:after { + content: ""; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } } // Add link hover decoration to prev/next text if no label present on prev/next only mode From 80b47c3b5bf0cf2f9e2a91d5e1ff7eefc45a9176 Mon Sep 17 00:00:00 2001 From: Nick Colley Date: Fri, 19 Aug 2022 15:52:24 +0100 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0ee76ccf8..ea5f985f7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,12 @@ This will enable screen reader users to have a better, more coherent experience This was added in [pull request #2677: Amend error summary markup to fix page load focus bug in JAWS 2022](https://github.com/alphagov/govuk-frontend/pull/2677) +### Fixes + +We’ve made fixes to GOV.UK Frontend in the following pull requests: + +- [#2800: Improve Pagination component print styles](https://github.com/alphagov/govuk-frontend/pull/2800) + ## 4.3.1 (Patch release) ### Recommended changes