From 2dfe6c2d56719e03f31c74cc1d6d65e2df686031 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 25 Aug 2019 17:21:25 +0100 Subject: [PATCH] Fixed failing test and added more accessibility improvements - Updated linked images to have obvious focus styles - Added proper role to notifications - Made dropdown list focus styles a bit nicer. - Updated book list chapter child slide down to be keyboard activatable. Related to #1320 --- resources/assets/sass/_lists.scss | 9 ++++++--- resources/assets/sass/_text.scss | 4 ++++ resources/views/chapters/child-menu.blade.php | 2 +- resources/views/chapters/list-item.blade.php | 4 +++- resources/views/partials/custom-styles.blade.php | 2 +- resources/views/partials/notifications.blade.php | 6 +++--- tests/Entity/PageRevisionTest.php | 2 +- 7 files changed, 19 insertions(+), 10 deletions(-) diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index 74c36c86c..a448266f3 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -59,6 +59,8 @@ .chapter-expansion-toggle { border-radius: 0 4px 4px 0; padding: $-xs $-m; + width: 100%; + text-align: left; } .chapter-expansion-toggle:hover { background-color: rgba(0, 0, 0, 0.06); @@ -554,14 +556,15 @@ ul.pagination { display: block; padding: $-xs $-m; color: #555; - fill: #555; + fill: currentColor; white-space: nowrap; &:hover, &:focus { text-decoration: none; - background-color: #EEE; + background-color: var(--color-primary-light); + color: var(--color-primary); } &:focus { - outline: 1px solid rgba(0, 0, 0, 0.2); + outline: 1px solid var(--color-primary); outline-offset: -2px; } svg { diff --git a/resources/assets/sass/_text.scss b/resources/assets/sass/_text.scss index f4406144d..315f08c34 100644 --- a/resources/assets/sass/_text.scss +++ b/resources/assets/sass/_text.scss @@ -106,6 +106,10 @@ a { position: relative; display: inline-block; } + &:focus img:only-child { + outline: 2px dashed var(--color-primary); + outline-offset: 2px; + } } .blended-links a { diff --git a/resources/views/chapters/child-menu.blade.php b/resources/views/chapters/child-menu.blade.php index 951825346..6137c34e8 100644 --- a/resources/views/chapters/child-menu.blade.php +++ b/resources/views/chapters/child-menu.blade.php @@ -1,5 +1,5 @@
- diff --git a/resources/views/chapters/list-item.blade.php b/resources/views/chapters/list-item.blade.php index fd463e07a..7e2e0e1c5 100644 --- a/resources/views/chapters/list-item.blade.php +++ b/resources/views/chapters/list-item.blade.php @@ -11,7 +11,9 @@
@icon('page')
-
@icon('caret-right') {{ trans_choice('entities.x_pages', $chapter->pages->count()) }}
+
@include('partials.entity-list', ['entities' => $chapter->pages]) diff --git a/resources/views/partials/custom-styles.blade.php b/resources/views/partials/custom-styles.blade.php index 34b702c51..908079082 100644 --- a/resources/views/partials/custom-styles.blade.php +++ b/resources/views/partials/custom-styles.blade.php @@ -3,4 +3,4 @@ --color-primary: {{ setting('app-color') }}; --color-primary-light: {{ setting('app-color-light') }}; } - + \ No newline at end of file diff --git a/resources/views/partials/notifications.blade.php b/resources/views/partials/notifications.blade.php index ac853a56c..526871499 100644 --- a/resources/views/partials/notifications.blade.php +++ b/resources/views/partials/notifications.blade.php @@ -1,11 +1,11 @@ -