-
Notifications
You must be signed in to change notification settings - Fork 440
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
Fixes for keyboard navigation #2122
Conversation
Is this required for the lobby PR? Doesn't look like |
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The tab headers contain a link that was focusable using keyboard navigation. However, the CSS styles that highlight the tab header were associated to the whole tab header, so even if the link was focused the tab header was not highlighted. Now the link is no longer focusable and the tab header itself is the element that gets the focus, which causes it to be highlighted when navigating with the keyboard. Also, the same selection behaviour applied when the tab header is clicked is now applied when pressing space or enter. Finally, as the tab header can not be selected again when it is already selected the tab header is not focusable either when it is already selected. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The select2 containers have the same size as the "oca-spreedme-add-XXX" wrappers that contain them, so the borders can be moved from those wrappers to the containers themselves. This makes possible to set a stronger border when the select2 container is active/focused. Besides that now the text is stronger too when the select2 container is focused to show that more clearly. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The "copy link" button was not an actual button but a span, so it was ignored in keyboard navigation. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The edit button was not an actual button but a span, so it was ignored in keyboard navigation. Moreover, the opacity was applied to its parent element instead of to the button itself, so it was not highlighted when focused. Also, after the input is hidden now the focus is given back to the edit button. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The sidebar trigger was not an actual button but a div, so it was ignored in keyboard navigation. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The password button was not an actual button but a span, so it was ignored in keyboard navigation. Also, after the password menu is hidden now the focus is given back to the password button. The button was also wrapped in a div with the "menutoggle" CSS class, which causes the menu to be hidden when clicking again on the toggle. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The first link child of items in the participants list is the participant information, which includes the avatar, name... However, there is no direct "img" child of that element (the avatar image is a child of the avatar element), so the rule has no effect. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The participant items were link elements, so they were taken into account in keyboard navigation. However, although it is possible to interact with some of its children, it is not possible to interact with the participant item as a whole, so they should not be focusable. As the link in the participant items led nowhere they are now simple span elements instead of links. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the current user is an actual user and not a guest clicking on the avatar of a participant shows the contacts menu (unless the participant is the current user or a guest), so when hovering on the avatar the cursor should be a pointer to imply a possible interaction. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The avatar is a div, so it is not focusable by default. However, if it were focused it could not be properly "highlighted" with a border; the whole avatar is dimmed for offline participants, so the border colour would be different when "highlighting" the avatar of online and offline participants. Due to this the avatar is now wrapped in another div which is the focusable one (provided the avatar has a contacts menu) and the one that gets the border. Finally, when the Enter or space keys are pressed on the wrapper a click is triggered in the avatar, which shows the contacts menu. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
e38a627
to
bf87c25
Compare
It is. I have rebased but cancelled the Drone job (it would have passed, as the changes in master did not affect this pull request) as well as removed the call to backport bot for now. |
Works surprisingly well. It's only weird that when the participant/room list reloads you have to start at the top again when you where in that sector. |
Right, it is caused by rendering the views again; the element with the focus is removed, so the browser moves the focus back to the closest parent. It happens too in the |
/backport to stable16 |
The backport to stable16 failed. Please do this backport manually. |
Draft until #2117 is merged (first commit of this pull request is Do not select again an already selected tab)
"Requires" (that is, the password button works better with) nextcloud/server#16863
This pull request fixes several elements not being focusable (or being focusable when they should not be) or highlighted when focused:
This can be tested by navigating through the main Talk UI by pressing tab and checking that
Some things to keep in mind: