From c9c3b88f4de875fac777384af57cb96def622204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB?= Date: Fri, 2 May 2025 12:39:16 +0200 Subject: [PATCH 1/6] style: apply editorconfig --- resources/views/front/index.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/front/index.blade.php b/resources/views/front/index.blade.php index e68b58e..9e390ef 100644 --- a/resources/views/front/index.blade.php +++ b/resources/views/front/index.blade.php @@ -1,4 +1,4 @@ -@extends('frame') +@extends('frame') @section('title', 'This is The Bad Space') @section('main-content') @parent @@ -55,4 +55,4 @@ - @endsection \ No newline at end of file + @endsection From 3e070676e4f9ccad2015b5b4331eca64a44c75b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB?= Date: Fri, 2 May 2025 17:03:41 +0200 Subject: [PATCH 2/6] feat: add accessible form element focus indicator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit adds a focus indicator that passes the accessibility requirements WCAG 2.2: §1.4.11 & §2.4.7 --- public/assets/css/front/index.css | 6 ++++++ public/assets/css/global/forms.css | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/public/assets/css/front/index.css b/public/assets/css/front/index.css index f73f367..ec9b25b 100644 --- a/public/assets/css/front/index.css +++ b/public/assets/css/front/index.css @@ -3,6 +3,12 @@ section.index-search { background: var(--white); } +/* TODO: move to a global file? it’s not only for forms. */ +section.index-search :focus-visible { + outline: 2px solid var(--white); + outline-offset: -4px; +} + section.start a.search-link { color: var(--highlight); font-size: 2.5em; diff --git a/public/assets/css/global/forms.css b/public/assets/css/global/forms.css index f965472..7d7ec02 100644 --- a/public/assets/css/global/forms.css +++ b/public/assets/css/global/forms.css @@ -14,10 +14,18 @@ input[type="text"] { input[type="text"]:focus, input[type="password"]:focus { - outline: solid var(--highlight); background-color: var(--highlight); } +/* TODO: generalise this a bit */ +button:focus, +input[type="submit"]:focus, +input[type="text"]:focus, +input[type="password"]:focus { + outline: 2px solid var(--white); + outline-offset: -4px; +} + textarea { border: 0; border-radius: 3px; From d165d0c2bdba12e718a8dcff8c942334cc1a51e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB?= Date: Fri, 2 May 2025 17:23:49 +0200 Subject: [PATCH 3/6] feat: replace search icon with an SVG this change allows us to use the font colour for the icon. it might also be nice to use a sprite.svg for all icons. this would use the same mechanism as i did here. this also optimises the SVG a bit --- public/assets/css/front/index.css | 9 +++------ public/assets/images/global/icon-search.svg | 10 +++------- resources/views/front/index.blade.php | 4 +++- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/public/assets/css/front/index.css b/public/assets/css/front/index.css index ec9b25b..e5c2d20 100644 --- a/public/assets/css/front/index.css +++ b/public/assets/css/front/index.css @@ -38,8 +38,9 @@ form.index-search-form > button { right: 0; } -form.index-search-form > button > img#search-icon { - float: none; +form.index-search-form > button > svg { + width: 48px; + height: 48px; } form.index-search-form > button > label { @@ -116,8 +117,4 @@ table.index-meta td { form.index-search-form > button > label { display: inline; } - - form.index-search-form > button > img#search-icon { - float: right; - } } diff --git a/public/assets/images/global/icon-search.svg b/public/assets/images/global/icon-search.svg index 47a3125..d41cc54 100644 --- a/public/assets/images/global/icon-search.svg +++ b/public/assets/images/global/icon-search.svg @@ -1,8 +1,4 @@ - - - - - - - + + + diff --git a/resources/views/front/index.blade.php b/resources/views/front/index.blade.php index 9e390ef..f63c242 100644 --- a/resources/views/front/index.blade.php +++ b/resources/views/front/index.blade.php @@ -7,7 +7,9 @@ + + + @csrf From 4dafad447dd70a478c9fb40934813c2fb0fe130f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB?= Date: Fri, 2 May 2025 17:32:42 +0200 Subject: [PATCH 4/6] fix: set accessible name for search button also changes the CSS for the text transform --- public/assets/css/front/index.css | 1 + resources/views/front/index.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/assets/css/front/index.css b/public/assets/css/front/index.css index e5c2d20..36b1194 100644 --- a/public/assets/css/front/index.css +++ b/public/assets/css/front/index.css @@ -36,6 +36,7 @@ form.index-search-form > button { position: relative; top: 9px; right: 0; + text-transform: uppercase; } form.index-search-form > button > svg { diff --git a/resources/views/front/index.blade.php b/resources/views/front/index.blade.php index f63c242..13d5d34 100644 --- a/resources/views/front/index.blade.php +++ b/resources/views/front/index.blade.php @@ -5,8 +5,8 @@