mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fixing aria bug (#20872)
This commit is contained in:
@@ -89,10 +89,13 @@ export class TreeGrid<T extends Slick.SlickData> extends Table<T> {
|
|||||||
const rowElement = this._tableContainer.querySelector(`div [role="row"][aria-rowindex="${(i + 1)}"]`);
|
const rowElement = this._tableContainer.querySelector(`div [role="row"][aria-rowindex="${(i + 1)}"]`);
|
||||||
// If the row element is found in the dom, we are setting the required aria attributes for it.
|
// If the row element is found in the dom, we are setting the required aria attributes for it.
|
||||||
if (rowElement) {
|
if (rowElement) {
|
||||||
|
const cellDiv = <HTMLElement>rowElement.querySelector(`.slick-cell.l0`);
|
||||||
|
if (cellDiv) {
|
||||||
if (rowData.expanded !== undefined) {
|
if (rowData.expanded !== undefined) {
|
||||||
rowElement.ariaExpanded = rowData.expanded;
|
cellDiv.ariaExpanded = rowData.expanded;
|
||||||
} else {
|
} else {
|
||||||
rowElement.removeAttribute('aria-expanded');
|
cellDiv.removeAttribute('aria-expanded');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rowData.setSize !== undefined) {
|
if (rowData.setSize !== undefined) {
|
||||||
rowElement.ariaSetSize = rowData.setSize;
|
rowElement.ariaSetSize = rowData.setSize;
|
||||||
|
|||||||
Reference in New Issue
Block a user