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-menu): provide a way to focus items on fetch #10210

Merged
merged 8 commits into from
Dec 4, 2024

Conversation

tsanislavgatev
Copy link
Contributor

@tsanislavgatev tsanislavgatev commented Nov 19, 2024

We now provide an option to set the focus to the first item when a menu is opened.
To achieve that you have to call the focus method of either the Menu or MenuItem parenting the menu you're opening.
How To can be seen in the sample we're adding.

fixes: #7237

Copy link
Contributor

@unazko unazko left a comment

Choose a reason for hiding this comment

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

Works as expected.

Copy link
Contributor

@nnaydenow nnaydenow left a comment

Choose a reason for hiding this comment

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

Please add test.

@tsanislavgatev
Copy link
Contributor Author

Still need to add test.

packages/main/cypress/specs/Menu.cy.ts Outdated Show resolved Hide resolved
packages/main/cypress/specs/Menu.cy.ts Outdated Show resolved Hide resolved
packages/main/cypress/specs/Menu.cy.ts Outdated Show resolved Hide resolved
packages/main/test/pages/Menu.html Outdated Show resolved Hide resolved
@tsanislavgatev tsanislavgatev merged commit 073f0f6 into main Dec 4, 2024
10 checks passed
@tsanislavgatev tsanislavgatev deleted the menu-delay-fix branch December 4, 2024 14:03
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.5.0-rc.3 🎉

The release is available on v2.5.0-rc.3

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ui5-menu | Accessibility]: Focus not shifting to the first element when the menu has dynamic content
4 participants