From 5188c6037411fa70bff974a1594a9086ac7cc404 Mon Sep 17 00:00:00 2001 From: Abimbola Aminat Buari Date: Sat, 24 Oct 2020 18:16:40 +0100 Subject: [PATCH 1/3] Create skip to content element --- app/index.html | 1 + sass/overrides/_skip-to-content.scss | 18 ++++++++++++++++++ sass/vendor.scss | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 sass/overrides/_skip-to-content.scss diff --git a/app/index.html b/app/index.html index 9ccefe4494..b6a8089ee4 100644 --- a/app/index.html +++ b/app/index.html @@ -19,6 +19,7 @@ + Skip to content
diff --git a/sass/overrides/_skip-to-content.scss b/sass/overrides/_skip-to-content.scss new file mode 100644 index 0000000000..19ef863031 --- /dev/null +++ b/sass/overrides/_skip-to-content.scss @@ -0,0 +1,18 @@ +.skip-to-content { + position: absolute; + top: -20px; + z-index: 0; + overflow: hidden; + + &:focus, + &:active { + top: 0px; + font-size: 20px; + text-decoration: underline; + padding: 6px; + border-radius: 0px 0px 5px 5px; + background: #fff; + z-index: 4444; + width: 150px; + } +} diff --git a/sass/vendor.scss b/sass/vendor.scss index 08a5d4a50b..13090eed49 100644 --- a/sass/vendor.scss +++ b/sass/vendor.scss @@ -23,4 +23,5 @@ @import "overrides/charts"; @import "overrides/doorbell"; @import "overrides/intercom"; -@import "overrides/tui-markdown"; +@import "overrides/tui-markdown"; +@import "overrides/skip-to-content"; \ No newline at end of file From 42c9cdf8dd7dc5f5e3e5a17914167296f2667da0 Mon Sep 17 00:00:00 2001 From: Abimbola Aminat Buari Date: Sat, 24 Oct 2020 18:35:41 +0100 Subject: [PATCH 2/3] Add html features for accessibility --- app/main/posts/views/card.html | 2 +- app/main/posts/views/post-view-data.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/posts/views/card.html b/app/main/posts/views/card.html index 229956e851..b5b80a41a6 100644 --- a/app/main/posts/views/card.html +++ b/app/main/posts/views/card.html @@ -3,7 +3,7 @@
-
+
diff --git a/app/main/posts/views/post-view-data.html b/app/main/posts/views/post-view-data.html index 0614319f1c..ad29b87236 100644 --- a/app/main/posts/views/post-view-data.html +++ b/app/main/posts/views/post-view-data.html @@ -63,7 +63,7 @@

-
+
From 1844a456fd2611ec35bcb497462736005ab0c420 Mon Sep 17 00:00:00 2001 From: Abimbola Aminat Buari Date: Fri, 30 Oct 2020 13:23:28 +0100 Subject: [PATCH 3/3] Make changes to posts for accessibility --- app/main/posts/views/card.html | 2 +- app/main/posts/views/post-card.directive.js | 3 +++ sass/overrides/_skip-to-content.scss | 18 ------------------ sass/vendor.scss | 3 +-- 4 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 sass/overrides/_skip-to-content.scss diff --git a/app/main/posts/views/card.html b/app/main/posts/views/card.html index b5b80a41a6..0a6e8cf4ca 100644 --- a/app/main/posts/views/card.html +++ b/app/main/posts/views/card.html @@ -3,7 +3,7 @@
-
+
diff --git a/app/main/posts/views/post-card.directive.js b/app/main/posts/views/post-card.directive.js index 8561633a44..6ac8ceae54 100644 --- a/app/main/posts/views/post-card.directive.js +++ b/app/main/posts/views/post-card.directive.js @@ -47,6 +47,9 @@ function PostCardDirective(FormEndpoint, PostLockService, $rootScope) { // But ignore the action return; } + if (evt && evt.key && (evt.key !== ' ' && evt.key !== 'Enter' && evt.key !== 'Spacebar')) { + return; + } $scope.externalClickAction($scope.post); } diff --git a/sass/overrides/_skip-to-content.scss b/sass/overrides/_skip-to-content.scss deleted file mode 100644 index 19ef863031..0000000000 --- a/sass/overrides/_skip-to-content.scss +++ /dev/null @@ -1,18 +0,0 @@ -.skip-to-content { - position: absolute; - top: -20px; - z-index: 0; - overflow: hidden; - - &:focus, - &:active { - top: 0px; - font-size: 20px; - text-decoration: underline; - padding: 6px; - border-radius: 0px 0px 5px 5px; - background: #fff; - z-index: 4444; - width: 150px; - } -} diff --git a/sass/vendor.scss b/sass/vendor.scss index 13090eed49..3e90da4c73 100644 --- a/sass/vendor.scss +++ b/sass/vendor.scss @@ -23,5 +23,4 @@ @import "overrides/charts"; @import "overrides/doorbell"; @import "overrides/intercom"; -@import "overrides/tui-markdown"; -@import "overrides/skip-to-content"; \ No newline at end of file +@import "overrides/tui-markdown"; \ No newline at end of file