diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-03-16 01:07:55 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-05-16 13:21:48 +0200 |
commit | c1499519d4a57859fa69098a743430a2dc068800 (patch) | |
tree | c10816498597e9850140b4d975d68c47bdffd817 /core/css/apps.scss | |
parent | ad405e93767cfaf0ba34011010bb26dc4c05f60a (diff) | |
download | nextcloud-server-c1499519d4a57859fa69098a743430a2dc068800.tar.gz nextcloud-server-c1499519d4a57859fa69098a743430a2dc068800.zip |
Improve accessibility with more visible focus indication for non vue apps
- Add visible-focus effect on each header entry
- Show focus outline when using focus-visible (keyboard navigation)
- Add polyfy for focus-visible since it's only very recently available
on webkit
- Change text for link to home button to describe the destination and
not the current page
- Improve focus effect in app sidebar navigation
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'core/css/apps.scss')
-rw-r--r-- | core/css/apps.scss | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/core/css/apps.scss b/core/css/apps.scss index aa532c462d0..f204074cb41 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -124,7 +124,7 @@ kbd { > ul { position: relative; height: 100%; - width: inherit; + width: 100%; overflow-x: hidden; overflow-y: auto; box-sizing: border-box; @@ -162,6 +162,11 @@ kbd { background-color: var(--color-background-hover); } } + a:focus-visible { + border-radius: var(--border-radius); + box-shadow: var(--color-primary) inset 0 0 0 2px; + outline: none; + } &.active, a:active, a.selected , @@ -283,6 +288,9 @@ kbd { &.svg { padding: 0 12px 0 44px; + :focus-visible { + padding: 0 8px 0 42px; + } } &:first-child img { margin-right: 11px; @@ -373,6 +381,13 @@ kbd { /* Needed for IE11; otherwise the button appears to the right of the * link. */ left: 0; + + &:focus-visible { + opacity: 1; + border-width: 0; + box-shadow: inset 0 0 0 2px var(--color-primary); + background: none; + } } &:before { position: absolute; @@ -764,6 +779,12 @@ $min-content-width: variables.$breakpoint-mobile - variables.$navigation-width - display: block; filter: var(--background-invert-if-dark); } + + &:focus-visible { + box-shadow: 0 0 0 2px inset var(--color-primary) !important; + border-radius: var(--border-radius); + background-position: 12px center; + } } /* GENERAL SECTION ------------------------------------------------------------ */ |