The Wayback Machine - https://web.archive.org/web/20211030042614/https://github.com/angular/components/issues/23616
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

bug(cdk/table): Default role value in angular 12 is now table and before it was grid #23616

Open
pmancaux opened this issue Sep 22, 2021 · 1 comment

Comments

@pmancaux
Copy link

@pmancaux pmancaux commented Sep 22, 2021

Expected Behavior

in angular 12.2.5 documentation : https://github.com/angular/components/blob/12.2.5/src/material/table/table.md

you say that :

Table's default role is grid, and it can be changed to treegrid through role attribute.

But if we see the source code : https://github.com/angular/components/blob/12.2.5/src/cdk/table/table.ts

if (!role) { this._elementRef.nativeElement.setAttribute('role', 'table'); }

default value seem to be 'table' and this have an impact on UFT Microfocus because all test failed on identification object of type mat-table

In previous version of angular before < 12 default value is grid as you can see :

https://github.com/angular/components/blob/11.2.13/src/cdk/table/table.ts

what is the expected behavior?

Environment

  • Angular: 12.2.5
  • CDK/Material: mat-table - cdk/table
  • Browser(s): Chrome/firefox
  • Operating System (e.g. Windows, macOS, Ubuntu): ubuntu/windows
lukaonik added a commit to lukaonik/components that referenced this issue Oct 10, 2021
…ore it was grid

Fixes table role attribute property. changed 'table' to 'grid'

Fixes angular#23616
@lukaonik
Copy link
Contributor

@lukaonik lukaonik commented Oct 11, 2021

As it seems it was intentionally changed in #22491 . Also, I checked the latest version which is 12.2.8v and the docs are updated as well https://material.angular.io/components/table/overview#accessibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment