read whole rows in the search wallet results, name the add account pop-up and hide the glyph icons in dialog headers from screen readers
What changed, and why it matters
This commit improves accessibility for users who rely on screen readers. It makes the 'search wallet' results read out entire rows instead of only the first cell, gives the 'add account' pop-up a hidden label so screen readers can name it, and hides decorative icon graphics from screen readers across several dialog windows. There is no security vulnerability or exploit here.
No security action required. Treat as a normal accessibility improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The changes are purely accessibility-related. Glyph icons used as dialog graphics are wrapped in a DecorativePane so assistive technologies ignore them. A hidden Label is added to AddAccountDialog to name the dialog for screen readers. SearchWalletDialog gets a custom TreeTableCell (RowSummaryCell) that overrides queryAccessibleAttribute(TEXT) to concatenate the text of sibling cells, enabling screen readers to announce the full row content rather than only the wallet/account/entry type cell.
Changed components
AddAccountDialogCardPinDialogKeystorePassphraseDialogPrivateKeySweepDialogRangeInputDialogSearchWalletDialogTransactionIdDialogWalletBirthDateDialogWalletLabelDialogWalletNameDialogWalletPasswordDialogInspect captured patch +49 / −11
### src/main/java/com/sparrowwallet/sparrow/control/AddAccountDialog.java
@@ -35,7 +35,7 @@ public AddAccountDialog(Wallet wallet) {
Glyph key = new Glyph(FontAwesome5.FONT_NAME, FontAwesome5.Glyph.SORT_NUMERIC_DOWN);
key.setFontSize(50);
- dialogPane.setGraphic(key);
+ dialogPane.setGraphic(new DecorativePane(key));
final VBox content = new VBox(10);
content.setPrefHeight(50);
@@ -110,7 +110,12 @@ public StandardAccount fromString(String string) {
} else {
standardAccountCombo.getSelectionModel().select(0);
}
- content.getChildren().add(standardAccountCombo);
+ //The header names the choice, so a hidden label names the pop-up for screen readers, which still read its value
+ Label accountLabel = new Label("Account to add");
+ accountLabel.setLabelFor(standardAccountCombo);
+ accountLabel.setVisible(false);
+ accountLabel.setManaged(false);
+ content.getChildren().addAll(standardAccountCombo, accountLabel);
dialogPane.setContent(content);
setResultConverter(dialogButton -> dialogButton == ButtonType.OK ? List.of(standardAccountCombo.getValue()) : (dialogButton == discoverButtonType ? availableAccounts : null));
### src/main/java/com/sparrowwallet/sparrow/control/CardPinDialog.java
@@ -46,7 +46,7 @@ public CardPinDialog(WalletModel walletModel, boolean backupOnly) {
Glyph lock = new Glyph("FontAwesome", FontAwesome.Glyph.LOCK);
lock.setFontSize(50);
- dialogPane.setGraphic(lock);
+ dialogPane.setGraphic(new DecorativePane(lock));
Form form = new Form();
Fieldset fieldset = new Fieldset();
### src/main/java/com/sparrowwallet/sparrow/control/KeystorePassphraseDialog.java
@@ -42,7 +42,7 @@ public KeystorePassphraseDialog(String walletName, Keystore keystore, boolean co
Glyph key = new Glyph(FontAwesome5.FONT_NAME, FontAwesome5.Glyph.KEY);
key.setFontSize(50);
- dialogPane.setGraphic(key);
+ dialogPane.setGraphic(new DecorativePane(key));
final VBox content = new VBox(10);
content.setPrefHeight(50);
### src/main/java/com/sparrowwallet/sparrow/control/PrivateKeySweepDialog.java
@@ -581,7 +581,7 @@ public PassphraseDialog() {
Glyph key = new Glyph(FontAwesome5.FONT_NAME, FontAwesome5.Glyph.KEY);
key.setFontSize(50);
- dialogPane.setGraphic(key);
+ dialogPane.setGraphic(new DecorativePane(key));
final VBox content = new VBox(10);
content.setPrefHeight(50);
### src/main/java/com/sparrowwallet/sparrow/control/RangeInputDialog.java
@@ -20,7 +20,7 @@ public RangeInputDialog(int min, int max, int initialValue) {
Glyph key = new Glyph(FontAwesome5.FONT_NAME, FontAwesome5.Glyph.SORT_NUMERIC_DOWN);
key.setFontSize(50);
key.setPadding(new Insets(0, 0, 0, 10));
- dialogPane.setGraphic(key);
+ dialogPane.setGraphic(new DecorativePane(key));
dialogPane.getButtonTypes().addAll(ButtonType.OK, ButtonType.CANCEL);
spinner = new Spinner<>();
### src/main/java/com/sparrowwallet/sparrow/control/SearchWalletDialog.java
@@ -3,6 +3,7 @@
import com.csvreader.CsvWriter;
import com.sparrowwallet.drongo.BitcoinUnit;
import com.sparrowwallet.drongo.KeyPurpose;
+import com.sparrowwallet.drongo.OsType;
import com.sparrowwallet.drongo.Utils;
import com.sparrowwallet.drongo.address.Address;
import com.sparrowwallet.drongo.address.InvalidAddressException;
@@ -17,6 +18,7 @@
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.ListChangeListener;
import javafx.event.ActionEvent;
+import javafx.scene.AccessibleAttribute;
import javafx.scene.control.*;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
@@ -35,6 +37,7 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.*;
+import java.util.stream.Collectors;
public class SearchWalletDialog extends Dialog<Entry> {
private static final Logger log = LoggerFactory.getLogger(SearchWalletDialog.class);
@@ -138,6 +141,10 @@ public SearchWalletDialog(List<WalletForm> walletForms) {
amountCol.setCellFactory(p -> new CoinCell());
results.getColumns().add(amountCol);
+ @SuppressWarnings("unchecked")
+ TreeTableColumn<Entry, String> firstColumn = (TreeTableColumn<Entry, String>)results.getColumns().getFirst();
+ firstColumn.setCellFactory(_ -> new RowSummaryCell());
+
vBox.getChildren().addAll(form, results);
dialogPane.setContent(vBox);
@@ -388,6 +395,32 @@ public Function getWalletFunction() {
}
}
+ //Moving up and down the results reads the first cell of each row, which held only the wallet, account or entry type, so it also reads the
+ //rest of the row. On macOS its own text is left out, as VoiceOver reads the text inside the cell as well; other screen readers read only the name.
+ private static class RowSummaryCell extends TreeTableCell<Entry, String> {
+ private static final boolean OWN_TEXT_READ_SEPARATELY = OsType.getCurrent() == OsType.MACOS;
+
+ @Override
+ protected void updateItem(String item, boolean empty) {
+ super.updateItem(item, empty);
+ setText(empty ? null : item);
+ }
+
+ @Override
+ public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) {
+ if(attribute == AccessibleAttribute.TEXT && getText() != null && getTableRow() != null) {
+ String summary = getTableRow().getChildrenUnmodifiable().stream()
+ .filter(node -> node instanceof TreeTableCell<?, ?> && !(OWN_TEXT_READ_SEPARATELY && node == this))
+ .map(node -> ((TreeTableCell<?, ?>)node).getText()).filter(text -> text != null && !text.isEmpty()).collect(Collectors.joining(", "));
+ if(!summary.isEmpty()) {
+ return summary;
+ }
+ }
+
+ return super.queryAccessibleAttribute(attribute, parameters);
+ }
+ }
+
private static class SearchEntryCell extends EntryCell {
@Override
protected void updateItem(Entry entry, boolean empty) {
### src/main/java/com/sparrowwallet/sparrow/control/TransactionIdDialog.java
@@ -36,7 +36,7 @@ public TransactionIdDialog() {
Glyph wallet = new Glyph("FontAwesome", FontAwesome.Glyph.BITCOIN);
wallet.setFontSize(50);
- dialogPane.setGraphic(wallet);
+ dialogPane.setGraphic(new DecorativePane(wallet));
final VBox content = new VBox(10);
content.getChildren().add(txid);
### src/main/java/com/sparrowwallet/sparrow/control/WalletBirthDateDialog.java
@@ -35,7 +35,7 @@ public WalletBirthDateDialog(Date birthDate, boolean singleAddress) {
Glyph wallet = new Glyph(FontAwesome5.FONT_NAME, FontAwesome5.Glyph.HISTORY);
wallet.setFontSize(50);
- dialogPane.setGraphic(wallet);
+ dialogPane.setGraphic(new DecorativePane(wallet));
HBox datePickerBox = new HBox(10);
Label label = new Label("Start scanning from:");
### src/main/java/com/sparrowwallet/sparrow/control/WalletLabelDialog.java
@@ -40,7 +40,7 @@ public WalletLabelDialog(String initialName, String walletType) {
Glyph wallet = new Glyph(FontAwesome5.FONT_NAME, FontAwesome5.Glyph.WALLET);
wallet.setFontSize(50);
- dialogPane.setGraphic(wallet);
+ dialogPane.setGraphic(new DecorativePane(wallet));
final VBox content = new VBox(20);
label = (CustomTextField) TextFields.createClearableTextField();
### src/main/java/com/sparrowwallet/sparrow/control/WalletNameDialog.java
@@ -72,7 +72,7 @@ public WalletNameDialog(String initialName, boolean hasExistingTransactions, Pol
Glyph wallet = new Glyph(FontAwesome5.FONT_NAME, FontAwesome5.Glyph.WALLET);
wallet.setFontSize(50);
- dialogPane.setGraphic(wallet);
+ dialogPane.setGraphic(new DecorativePane(wallet));
final VBox content = new VBox(20);
name = (CustomTextField)TextFields.createClearableTextField();
### src/main/java/com/sparrowwallet/sparrow/control/WalletPasswordDialog.java
@@ -48,7 +48,7 @@ public WalletPasswordDialog(String walletName, PasswordRequirement requirement,
Glyph lock = new Glyph("FontAwesome", FontAwesome.Glyph.LOCK);
lock.setFontSize(50);
- dialogPane.setGraphic(lock);
+ dialogPane.setGraphic(new DecorativePane(lock));
final VBox content = new VBox(10);
content.setPrefHeight(100);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.