From 1cdb3643612c5a1fa9d6e6701727bef9dabb4424 Mon Sep 17 00:00:00 2001 From: abaevbog Date: Sat, 27 Jul 2024 23:59:01 -0700 Subject: [PATCH] Fix first row of itemTree not getting announced (#4448) Tweak to the conditional to check if something is focused via selection.count (instead of selection.focused which defaults to 0 and fails on the first focused item). Post: 40fd5efe05bc2f0cf3abaf6b47b44408d39d0d38. Fixes: #4444 --- chrome/content/zotero/components/virtualized-table.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/components/virtualized-table.jsx b/chrome/content/zotero/components/virtualized-table.jsx index ac5f3cecd4..0eb5f0e992 100644 --- a/chrome/content/zotero/components/virtualized-table.jsx +++ b/chrome/content/zotero/components/virtualized-table.jsx @@ -1432,7 +1432,7 @@ class VirtualizedTable extends React.Component { // Set aria-activedescendant on table container _setAriaAciveDescendant() { - if (!this.selection.focused) return; + if (!this.selection.count) return; let selected = this._jsWindow?.getElementByIndex(this.selection.focused); if (selected) { selected.closest(".virtualized-table").setAttribute("aria-activedescendant", selected.id);