-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make possible to focus grid/list view toggle via keyboard #16154
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :)
@skjnldsv tried giving the checkbox the tab focus, but it seems to conflict with our custom checkboxes. What would your approach be? |
But the checkbox should already have the focus, right? Since this is a hidden and not display:none element? |
Please test. :) It does not receive the focus at all at the moment. |
Nice catch! server/apps/files/css/files.scss Lines 1084 to 1086 in b6376b7
|
So 17 or 18? |
I would say 17 since it fixes the accessibility of an essential part of the software. As said, needs JS help. @skjnldsv? |
No, only what is mentioned on my comment. |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
900440e
to
cbc3862
Compare
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 👍 |
then we should move the input and label after the home button (in the html order) |
Lets fix that separatly so this at least is in |
/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. :)