Skip to content
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(NcListItem) - define a single place for NcActions to render #4356

Merged
merged 1 commit into from Jul 24, 2023

Conversation

Antreesy
Copy link
Contributor

☑️ Resolves

  • Fix NcListItem: Can not access actions using keyboard navigation #3889
  • I've noticed, that we may render two NcActions component in one NcListItem, but hide one of them with display: none
  • Because of that, and because of behaviour of handleTab() method in NcListItem, we couldn't focus one of the two available action menus
  • Not sure, that behaviour now is align with a11y requirements, but at least actions are accessible

🖼️ Screenshots

🏚️ Before

list-item-before.mp4

🏡 After

list-item-after.mp4

🚧 Tasks

  • Code review
  • Manual testing

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy added bug Something isn't working accessibility Making sure we design for the widest range of people possible, including those who have disabilities feature: list-item Related to the list-item component labels Jul 20, 2023
@Antreesy Antreesy added this to the 8.0.0 milestone Jul 20, 2023
@Antreesy Antreesy self-assigned this Jul 20, 2023
@szaimen
Copy link
Contributor

szaimen commented Jul 20, 2023

@Antreesy did you try starting from the bottom and using shift + tab? This does not seem to work as expected...

@Antreesy
Copy link
Contributor Author

This does not seem to work as expected...

That's because of mentioned method, it considers only forward order:
https://github.com/nextcloud/nextcloud-vue/blob/ff4baa4b5e9cc2291d368b019638516d64a9d4df/src/components/NcListItem/NcListItem.vue#L563-L572

Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, works fine.
And I'd expect around 29% performance increase ⚡️ in Talk with this change.

Let's backport it

@Antreesy
Copy link
Contributor Author

Antreesy commented Jul 22, 2023

@szaimen tabbing behaviour seems to be a different issue from the current PR. How about we merge it and solve Shift+Tab in a follow-up?

P.S. Also to not forget include in the follow-up:

  • If NcActions is not presented, we get a warning from handleTab() method: "TypeError: Cannot read properties of undefined (reading '$el')

@szaimen
Copy link
Contributor

szaimen commented Jul 24, 2023

@szaimen tabbing behaviour seems to be a different issue from the current PR. How about we merge it and solve Shift+Tab in a follow-up?

sounds okay to me

Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me then

@Antreesy Antreesy merged commit 53d96af into master Jul 24, 2023
16 checks passed
@Antreesy Antreesy deleted the fix/noid/fix-two-actions-in-listitem branch July 24, 2023 09:29
@Antreesy
Copy link
Contributor Author

/backport to stable7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Making sure we design for the widest range of people possible, including those who have disabilities bug Something isn't working feature: list-item Related to the list-item component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NcListItem: Can not access actions using keyboard navigation
3 participants