-
-
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
Fix tab navigation of menu in public share pages #17861
Fix tab navigation of menu in public share pages #17861
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.
Code looks good
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.
Looks good too me
@danxuliu how to test, or do you have screenshots? :) Also, the test seems failing? |
beta2 this is then I guess |
This makes possible to navigate to the menu toggle using the keyboard, as well as being semantically more correct. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The external shares entry showed a "button" that, when pressed, replaced the button with the input to set the remote share address. The "button" was actually a label for the input, so when the label was focused it transferred the focus to the input and thus pressing enter or space did not show the input. Moreover, inputs inside links are not valid HTML, and once shown there was no way to hide the input again. Due to all this, and for consistency with the direct link input, the external share input was moved to a different menu item that is shown and hidden when the button, which nows is also a real button, is clicked. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
833d63d
to
883a71c
Compare
Rebased. How to test
Result with this pull requestThe three dots button that shows the menu in the public share page can be focused by pressing the tab key. The menu can be opened by pressing enter/space when the button is focused, and it is possible to navigate through the menu with the tab key. Result without this pull requestThe three dots button that shows the menu in the public share page can not be focused by pressing the tab key. |
@jancborchardt I tried to show and hide the menu item with a nice transition... but I failed, sorry :-P
I have also noticed that the
aria-expanded
attribute in the menu toggle is not changed when the menu is opened, but I do not have the time right now to check what is wrong (but it seems that OC.Menu.registerMenu is not used in this menu).