hide empty wallet table rows from screen readers
What changed, and why it matters
This commit makes a minor user-interface accessibility improvement. In a wallet transaction table, empty placeholder rows that fill unused space are now hidden from screen-reader software so assistive technologies don't try to read blank rows. There is no security-relevant change.
No security action needed. Treat as a routine accessibility/usability fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
CoinTreeTable is a JavaFX TreeTableView used in Sparrow Wallet. The patch adds a custom row factory that overrides queryAccessibleAttribute(). For rows whose isEmpty() is true, it returns AccessibleRole.NODE and an empty children list, preventing screen readers from announcing filler rows. No data handling, cryptography, networking, or privilege logic is modified.
Changed components
src/main/java/com/sparrowwallet/sparrow/control/CoinTreeTable.javaInspect captured patch +21 / −0
### src/main/java/com/sparrowwallet/sparrow/control/CoinTreeTable.java
@@ -24,8 +24,11 @@
import io.reactivex.Observable;
import io.reactivex.subjects.PublishSubject;
import javafx.application.Platform;
+import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.geometry.Pos;
+import javafx.scene.AccessibleAttribute;
+import javafx.scene.AccessibleRole;
import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.scene.layout.StackPane;
@@ -46,6 +49,24 @@ public class CoinTreeTable extends TreeTableView<Entry> {
private final PublishSubject<WalletTableChangedEvent> walletTableSubject = PublishSubject.create();
private final Observable<WalletTableChangedEvent> walletTableEvents = walletTableSubject.debounce(1, TimeUnit.SECONDS);
+ public CoinTreeTable() {
+ setRowFactory(_ -> new TreeTableRow<>() {
+ @Override
+ public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) {
+ //Empty rows fill the space below the last entry and have nothing to read
+ if(isEmpty()) {
+ if(attribute == AccessibleAttribute.ROLE) {
+ return AccessibleRole.NODE;
+ } else if(attribute == AccessibleAttribute.CHILDREN) {
+ return FXCollections.emptyObservableList();
+ }
+ }
+
+ return super.queryAccessibleAttribute(attribute, parameters);
+ }
+ });
+ }
+
public TableType getTableType() {
return tableType;
}Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.