hide empty transaction tree rows from screen readers
What changed, and why it matters
This commit makes a small accessibility improvement in Sparrow Wallet's transaction details screen. It tells screen-reader software not to announce empty placeholder rows in a transaction tree list, so visually impaired users only hear meaningful items. There is no indication this is a security fix.
No security action needed. Treat as a routine accessibility/usability fix.
Security signals we found
No security signals present in diff or commit message
Change is limited to JavaFX accessibility attributes
Evidence from the diff
TransactionController.java overrides queryAccessibleAttribute() on a TreeView cell factory. When a cell is empty, it returns AccessibleRole.NODE and an empty children list instead of the default tree-cell role/children. This prevents assistive technologies from reading out blank rows that pad the tree view. The change is purely about accessibility semantics and does not alter data handling, validation, or wallet logic.
Changed components
src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.javaInspect captured patch +17 / −0
### src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.java
@@ -17,8 +17,11 @@
import javafx.application.Platform;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.SimpleDoubleProperty;
+import javafx.collections.FXCollections;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
+import javafx.scene.AccessibleAttribute;
+import javafx.scene.AccessibleRole;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.control.*;
@@ -192,6 +195,20 @@ protected void updateItem(TransactionForm form, boolean empty) {
}
}
}
+
+ @Override
+ public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) {
+ //Empty cells fill the space below the tree 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);
+ }
});
txdata.signingWalletProperty().addListener((observable, oldValue, newValue) -> {Why this scored 17/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.