angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.39k stars 6.76k forks source link

bug(MatMenu): Tooltip on menu options not dismissable #29996

Closed divyaprakash-dp closed 1 week ago

divyaprakash-dp commented 2 weeks ago

Is this a regression?

The previous version in which this bug was not present was

No response

Description

Accessibility requirement When additional content is triggered on pointer hover or on keyboard focus, that additional content MUST be visually perceived and MUST be dismissible.

Issue When we add tooltip to menu option, it gets displayed on focussing the menu option using keyboard. Pressing Esc closes the mat menu completely. Tooltip alone should be dismissible.

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-5lpuen?file=src%2Fmain.ts Steps to reproduce:

  1. Open the menu
  2. Focus on an option and tooltip will be shown
  3. Press Esc

Expected Behavior

Tooltip alone should be dismissible.

Actual Behavior

Mat menu is closed

Environment