From 3dc4e8659efcdba29cd351310944e87042d49b74 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Wed, 14 Jul 2021 16:47:46 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20focus=20state=20for=20search=20result?= =?UTF-8?q?s=20=E2=80=98Close=E2=80=99=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the mixin provided by GOV.UK Frontend to ensure that the focus style matches that used by other links. --- lib/assets/stylesheets/modules/_search.scss | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/assets/stylesheets/modules/_search.scss b/lib/assets/stylesheets/modules/_search.scss index f8b094df..c06b5c1d 100644 --- a/lib/assets/stylesheets/modules/_search.scss +++ b/lib/assets/stylesheets/modules/_search.scss @@ -130,16 +130,7 @@ html.has-search-results-open { cursor: pointer; &:focus { - background-color: $govuk-focus-colour; - outline: $govuk-focus-width solid transparent; - box-shadow: inset 0 0 0 1px $govuk-focus-colour; - } - - &:focus:not(:active):not(:hover) { - border-color: $govuk-focus-colour; - color: $govuk-focus-text-colour; - background-color: $govuk-focus-colour; - box-shadow: 0 2px 0 $govuk-focus-text-colour; + @include govuk-focused-text; } &::after { From 3bec24fce48b6a6f91e7fe1616ec8962740c187c Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Mon, 19 Jul 2021 11:25:38 +0100 Subject: [PATCH 2/2] Document in CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 592fb740..8f488c94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [#240: Update menu html structure so it's one single hierarchical list](https://github.com/alphagov/tech-docs-gem/pull/240) - [#244: Don't change the focus of the page on initial load](https://github.com/alphagov/tech-docs-gem/pull/244) - [#243: Fix focus state for links containing inline code](https://github.com/alphagov/tech-docs-gem/pull/243) +- [#245: Fix focus state for search results ‘Close’ button](https://github.com/alphagov/tech-docs-gem/pull/245) ## 2.3.0