cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

Keyboard navigation (a11y)

Open a0m0rajab opened this issue 1 year ago • 9 comments

Found a bug? Please fill out the sections below. 👍

Issue Summary

Being on the availability page, when opening the copy to menu, it would not allow to naviage with keyboard. https://app.cal.com/availability

Plus, I think the accessibility could be improved.

Steps to Reproduce

  1. go to: https://app.cal.com/availability
  2. Chose a schedule
  3. open copy to
  4. try to use ONLY your keyboard to enable a button.

The copy to menu is not navigatable through keyboard: image

suggestions

I tried to solve this with tabindex but did not work, here are a few links that I looked for to solve the issue but could not:

  • https://web.dev/control-focus-with-tabindex/
  • https://stackoverflow.com/questions/52998354/why-does-tabindex-not-work-after-first-tab-to-select-li
  • https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_WCAG/Keyboard

a0m0rajab avatar May 14 '23 19:05 a0m0rajab

@a0m0rajab there is no copy option. Can you show it through some screenshots? In this way, I can become easy to understands the issue.

abdullahkhan70 avatar May 15 '23 13:05 abdullahkhan70

Added an image and changed the description, thank you.

a0m0rajab avatar May 15 '23 13:05 a0m0rajab

We have the same issue when the tips are open: tips and profile

the keyboard goes to the last card in the tips then it got to the first one, I think it should show the first one the go to the profile.

right now, it's skipping the profile.

a0m0rajab avatar May 17 '23 17:05 a0m0rajab

@PeerRich I would like to inquire about the expected behavior of a keyboard in two different cases. Please find the details below:

Case 1:

  • The first checkbox should be automatically focused when the interface is loaded.

  • Users should be able to navigate through the checkboxes using the arrow keys.

Case 2:

  • Upon pressing the Tab key or arrow key, the focus should be directed to the first checkbox.

  • Once the focus is on the first checkbox, users should be able to navigate through the checkboxes using the arrow keys.

The user can able to toggle the checkbox using Enter key in both the cases.

Please tell me which case should I implement in the code. Thanks

SksOp avatar May 19 '23 20:05 SksOp

@SksOp in either solution have you tried to check them in the code? cause I was expecting to be able to navigate with arrow keys, but I could not use any of them, in the dev env.

a0m0rajab avatar May 19 '23 20:05 a0m0rajab

Yes, I was able to implement the feature in the code to get the navigation throughout the checkboxes using keyboard by pressing Tab key. But I thought some one might try to itterate using navigation key also. So I was wondering which one should I implement.

SksOp avatar May 19 '23 20:05 SksOp

That's great! if it does not take much effort from your side, did you think to open two PRs and let peer decide on which one they prefer? (this might save time from the conversation going back and forth)

And I got curios how you implemented it.

a0m0rajab avatar May 19 '23 21:05 a0m0rajab

@SksOp would not this be done with HTML or CSS without the need for extra logic?

a0m0rajab avatar May 20 '23 09:05 a0m0rajab

To do that using HTML , I guess we might require to use

wrapping this over form will do I guess, but its a theory. I haven't tried it yet

SksOp avatar May 20 '23 09:05 SksOp