_setAriaActiveDescendant(): Use _topDiv for clarity, fix typo (#4731)
This commit is contained in:
parent
23f9ebcd17
commit
fa2316154e
1 changed files with 3 additions and 3 deletions
|
@ -256,7 +256,7 @@ class TreeSelection {
|
||||||
_updateTree(shouldDebounce) {
|
_updateTree(shouldDebounce) {
|
||||||
if (!this.selectEventsSuppressed && this._tree.props.onSelectionChange) {
|
if (!this.selectEventsSuppressed && this._tree.props.onSelectionChange) {
|
||||||
this._tree.props.onSelectionChange(this, shouldDebounce);
|
this._tree.props.onSelectionChange(this, shouldDebounce);
|
||||||
this._tree._setAriaAciveDescendant();
|
this._tree._setAriaActiveDescendant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1431,11 +1431,11 @@ class VirtualizedTable extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set aria-activedescendant on table container
|
// Set aria-activedescendant on table container
|
||||||
_setAriaAciveDescendant() {
|
_setAriaActiveDescendant() {
|
||||||
if (!this.selection.count) return;
|
if (!this.selection.count) return;
|
||||||
let selected = this._jsWindow?.getElementByIndex(this.selection.focused);
|
let selected = this._jsWindow?.getElementByIndex(this.selection.focused);
|
||||||
if (selected) {
|
if (selected) {
|
||||||
selected.closest(".virtualized-table").setAttribute("aria-activedescendant", selected.id);
|
this._topDiv.setAttribute("aria-activedescendant", selected.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue