Skip to content

bug(tabs): mat-tab-nav-bar tab working with space but not with enter key #27843

Closed
@Simona25

Description

@Simona25

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Previously the mat-tab-nav-bar tabs could be activated both with space and enter, while now the space key still works but the enter doesn't trigger the action anymore.

Reproduction

Link: https://material.angular.io/components/tabs/examples official material example (Basic tab nav bar)
Steps to reproduce:

  1. Use the keyboard to move the focus inside the tab nav bar,
  2. Pressing Enter nothing happen,
  3. Pressing the Space the tab is correctly activated.

Expected Behavior

Pressing Enter the tab should be activated like when using hte Space.

Actual Behavior

Pressing Space works, while pressing Enter doesn't and the tab link isn't activated.

Environment

  • Angular: 16.2.5 (but also on the 15.2.5 for example)
  • CDK/Material: 16.2.5 (but also on the 15.2.5 for example)
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

Labels

AccessibilityThis issue is related to accessibility (a11y)P2The issue is important to a large percentage of users, with a workaroundarea: material/tabs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions