Remove chrome blue highlight and outline + some accessibility improvements

* TODO: test more elements in all UI for better accessibility
This commit is contained in:
Niko 2022-02-23 09:51:05 +01:00
parent c33f833a6b
commit 7ea551fffb
3 changed files with 18 additions and 1 deletions

View File

@ -86,3 +86,17 @@ body {
from { left: -200px; opacity: .5 }
to { left: 0; opacity: 1 }
}
*[onclick], *[href] {
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
*[onclick]:focus,
*[href]:focus {
outline: none !important;
}

View File

@ -90,6 +90,7 @@ app.template = {
tpl = tpl.replaceAll('{.'+k+'}',v);
}
}
tpl = tpl.replaceAll('onEnter="', 'onkeyup="if (event.key === \'Enter\') ');
return tpl;
},
}

View File

@ -1,5 +1,7 @@
<div class="item button dark rounder" data-id="{._id}"
onclick="app.pages.home.loadQuiz('{.id}')">
onclick="app.pages.home.loadQuiz('{.id}')"
onEnter="app.pages.home.loadQuiz('{.id}')"
tabindex="0">
<div class="flex">
<div><div class="avatar round">
<img class="round" src="{.from.avatar.url}"/>