Uh oh!
There was an error while loading. Please reload this page.
Make possible to focus grid/list view toggle via keyboard - #16154
Conversation
jancborchardt
commented
Jul 15, 2019
|
skjnldsv
left a comment
There was a problem hiding this comment.
Hum, actually I think this is the wrong way to go.
The label should not receive the focus on keyboard nav.
The checkbox should. That way you don't loose the element indicator on screen readers and you get the default behaviour everywhere :)
jancborchardt
commented
Jul 22, 2019
@skjnldsv tried giving the checkbox the tab focus, but it seems to conflict with our custom checkboxes. What would your approach be? |
skjnldsv
commented
Jul 22, 2019
But the checkbox should already have the focus, right? Since this is a hidden and not display:none element? |
jancborchardt
commented
Jul 22, 2019
Please test. :) It does not receive the focus at all at the moment. |
skjnldsv
commented
Jul 23, 2019
Nice catch! server/apps/files/css/files.scss Lines 1084 to 1086 in b6376b7 |
rullzer
commented
Aug 11, 2019
So 17 or 18? |
jancborchardt
commented
Aug 13, 2019
I would say 17 since it fixes the accessibility of an essential part of the software. As said, needs JS help. @skjnldsv? |
skjnldsv
commented
Aug 14, 2019
No, only what is mentioned on my comment. |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
900440e to
cbc3862Compareskjnldsv
commented
Aug 14, 2019
Here, can you review @jancborchardt :) |
Nice, this works! :) The only thing is that the toggle is focused before the home and upload icons in the controls bar? This seems strange and it should rather be between the upload button and the Recommendations. Otherwise 👍 |
skjnldsv
commented
Aug 15, 2019
then we should move the input and label after the home button (in the html order) |
rullzer
commented
Aug 15, 2019
Lets fix that separatly so this at least is in |
skjnldsv
commented
Aug 15, 2019
/backport to stable16 |
backport to stable16 in #16745 |
Needs help from @nextcloud/javascript to actually make the toggle also work on pressing enter when focused. :)