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(ui5-list): focus list on non-focusable child click #10124

Merged
merged 7 commits into from
Dec 16, 2024

Conversation

NakataCode
Copy link
Contributor

@NakataCode NakataCode commented Oct 31, 2024

Issue:

  • The custom list item did not receive focus when its child elements (such as plain text or ui5-avatar) were clicked, as the child elements did not have their own focus state.

Solution:

  • Added a focus check in fireItemPress to ensure the list item gains focus only if it doesn’t already have it.
  • Updated the tabindex getter of the Avatar to use undefined instead of -1, and now when its not interactive we can focus the list when we click on the ui5-avatar.

Fixes: #10096

@github-actions github-actions bot added the Stale label Nov 22, 2024
@github-actions github-actions bot closed this Nov 29, 2024
@NakataCode NakataCode reopened this Nov 29, 2024
@NakataCode NakataCode force-pushed the list-item-focus-on-click branch from b708ede to ec7a069 Compare November 29, 2024 14:23
@github-actions github-actions bot removed the Stale label Nov 30, 2024
@NakataCode NakataCode marked this pull request as ready for review December 2, 2024 07:34
Copy link
Contributor

@PetyaMarkovaBogdanova PetyaMarkovaBogdanova left a comment

Choose a reason for hiding this comment

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

It is ok, just in the second bullet point in Commit Message, you can specify the tab-index change is applied to the Avatar component.

@NakataCode NakataCode merged commit 6f98645 into main Dec 16, 2024
10 checks passed
@NakataCode NakataCode deleted the list-item-focus-on-click branch December 16, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ui5-list]: clicking on specific parts doesn't apply focus
2 participants