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

TieredMenu: Submenu 'popup' behavior different than PrimeVue #5975

Open
msalihaltun opened this issue Feb 15, 2024 · 4 comments
Open

TieredMenu: Submenu 'popup' behavior different than PrimeVue #5975

msalihaltun opened this issue Feb 15, 2024 · 4 comments
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA

Comments

@msalihaltun
Copy link

msalihaltun commented Feb 15, 2024

Describe the bug

I have two forked demos that shows the difference in behavior. In 10.2 TieredMenu submenus were activated by hover. In the latest version they can only be activated by clicking.

  • Latest version

https://stackblitz.com/edit/zjjwcj?file=src%2FApp.jsx

  • v10.2

https://stackblitz.com/edit/ompses?file=src%2FApp.jsx

Reproducer

https://stackblitz.com/edit/ompses?file=src%2FApp.jsx

PrimeReact version

latest

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Tested in chrome

Steps to reproduce the behavior

Use the demo to see the different behavior.

Expected behavior

I expect the submenus to activate by hover.

@msalihaltun msalihaltun added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 15, 2024
@melloware
Copy link
Member

@msalihaltun it appears PrimeVue is the same way: https://primevue.org/tieredmenu/

It was done as part of ARIA accessibility and keyboard support: https://primereact.org/tieredmenu/#accessibility

See #5657

@melloware melloware added Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 15, 2024
@msalihaltun
Copy link
Author

Thank you for your response.

@kyybo
Copy link
Contributor

kyybo commented Feb 21, 2024

@msalihaltun it appears PrimeVue is the same way: https://primevue.org/tieredmenu/

It was done as part of ARIA accessibility and keyboard support: https://primereact.org/tieredmenu/#accessibility

See #5657

@melloware @msalihaltun
Hi,
It seems to me that there's a difference in behavior between PrimeVue and PrimeReact.
A first click is required to open a first submenu, then once the TieredMenu has the focus, you can navigate inside it with the hover.
This behavior is the same for PrimeVue and PrimeReact.

However, if you activate the 'popup' property, the behavior described above no longer works in PrimeReact, as all submenus (and sub-submenus) can only be activated by clicking. (https://primereact.org/tieredmenu/#popup)
In PrimeVue, with the 'popup' property, once the first sub-menu has been opened, you can navigate through the TieredMenu using hovers (https://primevue.org/tieredmenu/#popup).

I don't think this difference in behavior is intentional. Perhaps this issue should be reopened (or a new one created).

@melloware melloware reopened this Feb 21, 2024
@melloware melloware added Component: Accessibility Issue or pull request is related to WCAG or ARIA and removed Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior labels Feb 21, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 21, 2024
@melloware melloware changed the title TieredMenu: Submenu behavior has changed between v10.2 and latest TieredMenu: Submenu 'popup' behavior different than PrimeVue Feb 21, 2024
@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 21, 2024
@kyybo
Copy link
Contributor

kyybo commented Mar 28, 2024

Hello there !
If anyone is looking for a simple solution, waiting for a PrimeReact fix, this CSS should do the work :
#your_tieredmenu_id li:hover>ul { display: block !important; top: 0px; left: 100%; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA
Projects
None yet
Development

No branches or pull requests

3 participants