angular / components

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

bug(mat-tab): tabs are focusable even if they are disabled #27030

Closed iKrishnaSahu closed 1 year ago

iKrishnaSahu commented 1 year ago

Is this a regression?

The previous version in which this bug was not present was

15.0.4

Description

bug(mat-tab): tabs are focusable even if they are disabled

Example - https://v15.material.angular.io/components/tabs/examples#tab-group-ink-bar

Also cdk-* classes are getting applied in disabled mode

v15.2.9 - https://stackblitz.com/edit/fpkg6a-vehkd7?file=package.json

v15 2 9

v15.0.4 - https://stackblitz.com/edit/ippjv4?file=package.json

v15 0 4

Reproduction

Steps to reproduce:

  1. Go to https://stackblitz.com/edit/fpkg6a-vehkd7?file=src%2Findex.html
  2. Try to navigate on mat-tab using keyboard as shown in attached GIF

Expected Behavior

Disabled item should not get focus

Actual Behavior

Disabled item is getting focus

Environment

crisbeto commented 1 year ago

This is working as expected. Users need to be able to navigate to disabled tabs to know that they exist.

angular-automatic-lock-bot[bot] commented 1 year ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.