Allow reordering questions using the keyboard#1532
Conversation
jancborchardt
left a comment
There was a problem hiding this comment.
Very nice enhancement! :) Makes it very obvious and accessible how to reorder, good stuff.
Only one thing: When reordering via these buttons, whether it be via keyboard or mouse click, it would be nice to have a quick animation of the movement using var(--animation-quick) or var(--animation-slow) depending on what looks better. :)
Thank you :)
Done. Added the animation, I choose vokoscreenNG-2023-02-22_15-46-53.mp4 |
jancborchardt
left a comment
There was a problem hiding this comment.
Looks really amazing now @susnux, great work! :)
|
@susnux I get lots of errors in the browser console like this: The lower part of the message varies... And at least for me the focus ring always stays on the ⬇️ button after clicking on it with the mouse. The ⬆️ button doesn't show the ring. |
|
@Chartman123 the errors should be fixed with nextcloud Vue 7.7.0: |
|
@susnux: With nc-vue 7.7 the errors are gone. But now I found some new ones: canMoveUp and canMoveDown are missing in the view mode and thus throwing errors. |
f441667 to
ff5e6fa
Compare
@Chartman123 those issues are resolved. And the focus issue is also resolved. |
Nice :) I will check it this evening |
ff5e6fa to
594f7b6
Compare
f0b1eb3 to
b08192c
Compare
cf128ed to
655c4ed
Compare
vokoscreenNG-2023-10-17_00-44-37.mp4 |
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Part 1: Adding missing aria role
Resolves: #1263
divs require a role whenaria-labelis set (see context in linked issue)Part 2: Add buttons
Resolves: #317
Added buttons for changing the order. Buttons can be focused and triggered using the keyboard.
This also preserves the drag and drop handling, but also allows using buttons or the keyboard.
The buttons are only shown if hovered / focused, but they are always accessible for screen readers.
If a button is clicked / triggered the focus is kept on the button (the vanishing focus ring in the following video happens only because disabled buttons from
@nextcloud/vuedo not have a visual focus ring)vokoscreenNG-2023-02-22_02-26-21.mp4