-
Couldn't load subscription status.
- Fork 156
Address grids column headers accessibility issues - active descendant, what is announced by SRs - 20.0.x #15982
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
Conversation
ecf4a33 to
d4f5859
Compare
d4f5859 to
2c9a5b3
Compare
| let describeBy = this.grid.headerGroupsList | ||
| .find(hg => hg.column.field === this.column.field)?.headerID || ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, is this because the column didn't have a field or because the description moved? Either way, while the header group list might be large in most cases, would generally avoid having getters for bindings that run on each change detection do any meaningful amount of work (like search) if it can be avoided.
| const totalRows = (this as any).totalItemCount ?? this.data?.length ?? 0; | ||
| return (this.paginator ? this._totalRecords : totalRows) + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, (this as any)? Surely that's not needed 👀
Also, rows are manipulated not just by the paginator, so that might not be the only case. Was going to ask if dataView length might do the trick, but by the look of it we do want to announce the full data set?
If so, I'm not entirely sure the virtualization index (which I believe drive row index) will match that in all cases.
Also would filtering and grouping need to be involved to determine the final count? Because those will affect the row index regardless IIRC. Basically, anything in the pipeline that manipulates the data collection is before the for-of even gets the data.
It might be the simplest way to poke the for-of state for the length of items and only detect remote/paginated scenarios to look for _totalRecords / totalItemCount
e9a6b89 to
e8be376
Compare
308b795 to
5eccd74
Compare
Closes #15962
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)