-
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
Changes from 13 commits
43db615
feefc10
2a350c4
e7c5d8f
f9c683d
aae6481
8d68f82
c3e6824
d7fd748
a5c8d73
64f9aeb
2c9a5b3
693a735
05faaa2
5eccd74
45bd8e3
293b082
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1839,6 +1839,16 @@ export abstract class IgxGridBaseDirective implements GridType, | |
| @HostBinding('class.igx-grid') | ||
| protected baseClass = 'igx-grid'; | ||
|
|
||
| @HostBinding('attr.aria-colcount') | ||
| protected get ariaColCount(): number { | ||
| return this.visibleColumns.length; | ||
| } | ||
|
|
||
| @HostBinding('attr.aria-rowcount') | ||
| protected get ariaRowCount(): number { | ||
| const totalRows = (this as any).totalItemCount ?? this.data?.length ?? 0; | ||
| return (this.paginator ? this._totalRecords : totalRows) + 1; | ||
|
||
| } | ||
|
|
||
| /** | ||
| * Gets/Sets the resource strings. | ||
|
|
@@ -2765,13 +2775,10 @@ export abstract class IgxGridBaseDirective implements GridType, | |
| public get activeDescendant() { | ||
| const activeElem = this.navigation.activeNode; | ||
|
|
||
| if (!activeElem || !Object.keys(activeElem).length) { | ||
| return this.id; | ||
| if (!activeElem || !Object.keys(activeElem).length || activeElem.row < 0) { | ||
| return null; | ||
| } | ||
|
|
||
| return activeElem.row < 0 ? | ||
| `${this.id}_${activeElem.row}_${activeElem.mchCache.level}_${activeElem.column}` : | ||
| `${this.id}_${activeElem.row}_${activeElem.column}`; | ||
| return `${this.id}_${activeElem.row}_${activeElem.column}`; | ||
| } | ||
|
|
||
| /** @hidden @internal */ | ||
|
|
||
Large diffs are not rendered by default.
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.