name the passphrase checkbox and field, and the derivation fields in the import panes, for screen readers
What changed, and why it matters
This commit improves accessibility for users who rely on screen readers. It adds hidden labels and accessible text to checkboxes and text fields in wallet import screens so screen-reading software can correctly describe what each field is for. There is no security vulnerability or exploit here.
No security action needed. Treat as a routine accessibility/usability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds JavaFX Label controls with setLabelFor() and setAccessibleText() calls for derivation path text fields, passphrase checkbox, and passphrase field across several keystore import panes. These labels are hidden visually but exposed to assistive technologies. No logic, validation, cryptography, or network behavior is modified.
Changed components
CardImportPane.javaCodexKeystoreImportPane.javaDevicePane.javaMnemonicKeystoreImportPane.javaMnemonicKeystorePane.javaMnemonicShareKeystoreImportPane.javaXprvKeystoreImportPane.javaInspect captured patch +33 / −0
### src/main/java/com/sparrowwallet/sparrow/control/CardImportPane.java
@@ -294,6 +294,7 @@ private Node getDerivationEntry() {
CheckBox checkBox = new CheckBox("Use Custom Derivation");
Label customLabel = new Label("Derivation:");
TextField customDerivation = new TextField(KeyDerivation.writePath(derivation));
+ customLabel.setLabelFor(customDerivation);
ValidationSupport validationSupport = new ValidationSupport();
validationSupport.setValidationDecorator(new StyleClassValidationDecoration());
### src/main/java/com/sparrowwallet/sparrow/control/CodexKeystoreImportPane.java
@@ -214,6 +214,11 @@ private Node getSecretShareEntry() {
private Node getDerivationEntry(List<ChildNumber> derivation) {
TextField derivationField = new TextField();
derivationField.setPromptText("Derivation path");
+ //Screen readers do not read prompt text, and accessible text on a text field would replace the path it reads, so it is named by an unshown label
+ Label derivationLabel = new Label("Derivation path");
+ derivationLabel.setVisible(false);
+ derivationLabel.setManaged(false);
+ derivationLabel.setLabelFor(derivationField);
derivationField.setText(KeyDerivation.writePath(derivation));
HBox.setHgrow(derivationField, Priority.ALWAYS);
@@ -241,6 +246,7 @@ private Node getDerivationEntry(List<ChildNumber> derivation) {
HBox contentBox = new HBox();
contentBox.setAlignment(Pos.TOP_RIGHT);
contentBox.setSpacing(20);
+ contentBox.getChildren().add(derivationLabel);
contentBox.getChildren().add(derivationField);
contentBox.getChildren().add(importDerivationButton);
contentBox.setPadding(new Insets(10, 30, 10, 30));
### src/main/java/com/sparrowwallet/sparrow/control/DevicePane.java
@@ -1248,6 +1248,11 @@ private void showOperationButton() {
private Node getDerivationEntry(List<ChildNumber> derivation) {
TextField derivationField = new TextField();
derivationField.setPromptText("Derivation path");
+ //Screen readers do not read prompt text, and accessible text on a text field would replace the path it reads, so it is named by an unshown label
+ Label derivationLabel = new Label("Derivation path");
+ derivationLabel.setVisible(false);
+ derivationLabel.setManaged(false);
+ derivationLabel.setLabelFor(derivationField);
derivationField.setText(KeyDerivation.writePath(derivation));
derivationField.setDisable(device.isCard() || requiredDerivation != null);
HBox.setHgrow(derivationField, Priority.ALWAYS);
@@ -1276,6 +1281,7 @@ private Node getDerivationEntry(List<ChildNumber> derivation) {
HBox contentBox = new HBox();
contentBox.setAlignment(Pos.TOP_RIGHT);
contentBox.setSpacing(20);
+ contentBox.getChildren().add(derivationLabel);
contentBox.getChildren().add(derivationField);
contentBox.getChildren().add(importDerivationButton);
contentBox.setPadding(new Insets(10, 30, 10, 30));
### src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreImportPane.java
@@ -288,6 +288,11 @@ private boolean importKeystore(List<ChildNumber> derivation, boolean dryrun) {
private Node getDerivationEntry(List<ChildNumber> derivation) {
TextField derivationField = new TextField();
derivationField.setPromptText("Derivation path");
+ //Screen readers do not read prompt text, and accessible text on a text field would replace the path it reads, so it is named by an unshown label
+ Label derivationLabel = new Label("Derivation path");
+ derivationLabel.setVisible(false);
+ derivationLabel.setManaged(false);
+ derivationLabel.setLabelFor(derivationField);
derivationField.setText(KeyDerivation.writePath(derivation));
HBox.setHgrow(derivationField, Priority.ALWAYS);
@@ -315,6 +320,7 @@ private Node getDerivationEntry(List<ChildNumber> derivation) {
HBox contentBox = new HBox();
contentBox.setAlignment(Pos.TOP_RIGHT);
contentBox.setSpacing(20);
+ contentBox.getChildren().add(derivationLabel);
contentBox.getChildren().add(derivationField);
contentBox.getChildren().add(importDerivationButton);
contentBox.setPadding(new Insets(10, 30, 10, 30));
### src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystorePane.java
@@ -450,6 +450,7 @@ public PassphraseEntry(boolean editable) {
Label usePassphraseLabel = new Label("Use passphrase?");
usePassphraseLabel.managedProperty().bind(usePassphraseLabel.visibleProperty());
CheckBox usePassphraseCheckbox = new CheckBox(" ");
+ usePassphraseCheckbox.setAccessibleText(usePassphraseLabel.getText());
usePassphraseCheckbox.setDisable(!editable);
usePassphraseCheckbox.managedProperty().bind(usePassphraseCheckbox.visibleProperty());
usePassphraseLabel.visibleProperty().bind(usePassphraseCheckbox.visibleProperty());
@@ -470,6 +471,7 @@ public PassphraseEntry(boolean editable) {
Label passphraseLabel = new Label(getPassphraseLabel());
passphraseLabel.managedProperty().bind(passphraseLabel.visibleProperty());
passphraseField = new TextField();
+ passphraseLabel.setLabelFor(passphraseField);
passphraseField.setPromptText(passphraseProperty.isEmpty().get() ? "Leave blank for none" : "");
passphraseField.setText(passphraseProperty.get());
passphraseField.setDisable(!editable);
### src/main/java/com/sparrowwallet/sparrow/control/MnemonicShareKeystoreImportPane.java
@@ -270,6 +270,11 @@ private boolean importKeystore(List<ChildNumber> derivation, boolean dryrun) {
private Node getDerivationEntry(List<ChildNumber> derivation) {
TextField derivationField = new TextField();
derivationField.setPromptText("Derivation path");
+ //Screen readers do not read prompt text, and accessible text on a text field would replace the path it reads, so it is named by an unshown label
+ Label derivationLabel = new Label("Derivation path");
+ derivationLabel.setVisible(false);
+ derivationLabel.setManaged(false);
+ derivationLabel.setLabelFor(derivationField);
derivationField.setText(KeyDerivation.writePath(derivation));
HBox.setHgrow(derivationField, Priority.ALWAYS);
@@ -297,6 +302,7 @@ private Node getDerivationEntry(List<ChildNumber> derivation) {
HBox contentBox = new HBox();
contentBox.setAlignment(Pos.TOP_RIGHT);
contentBox.setSpacing(20);
+ contentBox.getChildren().add(derivationLabel);
contentBox.getChildren().add(derivationField);
contentBox.getChildren().add(importDerivationButton);
contentBox.setPadding(new Insets(10, 30, 10, 30));
### src/main/java/com/sparrowwallet/sparrow/control/XprvKeystoreImportPane.java
@@ -182,6 +182,11 @@ private Node getXprvEntry(boolean displayOnly) {
private Node getDerivationEntry(List<ChildNumber> derivation) {
TextField derivationField = new TextField();
derivationField.setPromptText("Derivation path");
+ //Screen readers do not read prompt text, and accessible text on a text field would replace the path it reads, so it is named by an unshown label
+ Label derivationLabel = new Label("Derivation path");
+ derivationLabel.setVisible(false);
+ derivationLabel.setManaged(false);
+ derivationLabel.setLabelFor(derivationField);
derivationField.setText(KeyDerivation.writePath(derivation));
HBox.setHgrow(derivationField, Priority.ALWAYS);
@@ -209,6 +214,7 @@ private Node getDerivationEntry(List<ChildNumber> derivation) {
HBox contentBox = new HBox();
contentBox.setAlignment(Pos.TOP_RIGHT);
contentBox.setSpacing(20);
+ contentBox.getChildren().add(derivationLabel);
contentBox.getChildren().add(derivationField);
contentBox.getChildren().add(importDerivationButton);
contentBox.setPadding(new Insets(10, 30, 10, 30));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.