name split buttons from their text so screen readers read them
What changed, and why it matters
This commit improves accessibility for blind or low-vision users who rely on screen readers. It makes sure that special split-style buttons in the Sparrow Wallet app are announced with their visible label (like 'Import Keystore' or 'Sign by QR'). There is no security vulnerability being fixed 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 binds each SplitMenuButton’s accessibleTextProperty to its textProperty. In JavaFX, SplitMenuButton controls do not automatically expose their displayed text to assistive technologies, so screen readers would not name the button. The patch explicitly binds the accessible text so assistive tools read the button label. No cryptographic, input-validation, or authorization logic is modified.
Changed components
CodexKeystoreImportPane.javaDevicePane.javaMessageSignDialog.javaMnemonicKeystoreImportPane.javaMnemonicKeystorePane.javaMnemonicShareKeystoreImportPane.javaXprvKeystoreImportPane.javaInspect captured patch +20 / −0
### src/main/java/com/sparrowwallet/sparrow/control/CodexKeystoreImportPane.java
@@ -95,6 +95,8 @@ private void importKeystore(List<ChildNumber> derivation) {
private void createImportButton() {
importButton = new SplitMenuButton();
+ //A split button is not named by its text for screen readers
+ importButton.accessibleTextProperty().bind(importButton.textProperty());
importButton.setAlignment(Pos.CENTER_RIGHT);
importButton.setText("Import Keystore");
setDefaultButton(importButton);
### src/main/java/com/sparrowwallet/sparrow/control/DevicePane.java
@@ -296,6 +296,8 @@ private void createSetPassphraseButton() {
private void createImportButton() {
importButton = requiredDerivation == null ? new SplitMenuButton() : new Button();
+ //A split button is not named by its text for screen readers
+ importButton.accessibleTextProperty().bind(importButton.textProperty());
importButton.setAlignment(Pos.CENTER_RIGHT);
importButton.setText("Import Keystore");
importButton.setOnAction(event -> {
@@ -415,6 +417,8 @@ private void createGetPrivateKeyButton() {
}
getPrivateKeyButton = currentSlot > 0 ? new SplitMenuButton() : new Button();
+ //A split button is not named by its text for screen readers
+ getPrivateKeyButton.accessibleTextProperty().bind(getPrivateKeyButton.textProperty());
getPrivateKeyButton.setAlignment(Pos.CENTER_RIGHT);
getPrivateKeyButton.setText("Get Private Key");
getPrivateKeyButton.setOnAction(event -> {
@@ -531,6 +535,8 @@ private Node getPassphraseEntry() {
});
SplitMenuButton sendPassphraseButton = new SplitMenuButton();
+ //A split button is not named by its text for screen readers
+ sendPassphraseButton.accessibleTextProperty().bind(sendPassphraseButton.textProperty());
sendPassphraseButton.setText("Send Passphrase");
setDefaultButton(sendPassphraseButton);
sendPassphraseButton.setOnAction(event -> {
### src/main/java/com/sparrowwallet/sparrow/control/MessageSignDialog.java
@@ -795,6 +795,8 @@ private class MessageSignDialogPane extends DialogPane {
protected Node createButton(ButtonType buttonType) {
if(buttonType.getButtonData() == ButtonBar.ButtonData.LEFT) {
SplitMenuButton signByButton = new SplitMenuButton();
+ //A split button is not named by its text for screen readers
+ signByButton.accessibleTextProperty().bind(signByButton.textProperty());
signByButton.setText("Sign by QR");
signByButton.setDisable(wallet == null);
signByButton.setGraphic(getGlyph(new Glyph(FontAwesome5.FONT_NAME, FontAwesome5.Glyph.QRCODE)));
### src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreImportPane.java
@@ -56,6 +56,8 @@ public MnemonicKeystoreImportPane(Wallet wallet, KeystoreMnemonicImport importer
private void createImportButton() {
importButton = new SplitMenuButton();
+ //A split button is not named by its text for screen readers
+ importButton.accessibleTextProperty().bind(importButton.textProperty());
importButton.setAlignment(Pos.CENTER_RIGHT);
importButton.setText("Import Keystore");
setDefaultButton(importButton);
### src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystorePane.java
@@ -59,6 +59,8 @@ protected Control createButton() {
private void createEnterMnemonicButton() {
enterMnemonicButton = new SplitMenuButton();
+ //A split button is not named by its text for screen readers
+ enterMnemonicButton.accessibleTextProperty().bind(enterMnemonicButton.textProperty());
enterMnemonicButton.setAlignment(Pos.CENTER_RIGHT);
enterMnemonicButton.setText("Use 24 Words");
defaultWordSizeProperty = new SimpleIntegerProperty(24);
### src/main/java/com/sparrowwallet/sparrow/control/MnemonicShareKeystoreImportPane.java
@@ -61,6 +61,8 @@ protected Control createButton() {
private void createEnterMnemonicButton() {
enterMnemonicButton = new SplitMenuButton();
+ //A split button is not named by its text for screen readers
+ enterMnemonicButton.accessibleTextProperty().bind(enterMnemonicButton.textProperty());
enterMnemonicButton.setAlignment(Pos.CENTER_RIGHT);
enterMnemonicButton.setText("Use 20 Words");
defaultWordSizeProperty = new SimpleIntegerProperty(20);
@@ -194,6 +196,8 @@ protected void onWordChange(boolean empty, boolean validWords, boolean validChec
private void createImportButton() {
importButton = new SplitMenuButton();
+ //A split button is not named by its text for screen readers
+ importButton.accessibleTextProperty().bind(importButton.textProperty());
importButton.setAlignment(Pos.CENTER_RIGHT);
importButton.setText("Import Keystore");
setDefaultButton(importButton);
### src/main/java/com/sparrowwallet/sparrow/control/XprvKeystoreImportPane.java
@@ -78,6 +78,8 @@ protected Control createButton() {
private void createImportButton() {
importButton = new SplitMenuButton();
+ //A split button is not named by its text for screen readers
+ importButton.accessibleTextProperty().bind(importButton.textProperty());
importButton.setAlignment(Pos.CENTER_RIGHT);
importButton.setText("Import Keystore");
setDefaultButton(importButton);Why this scored 20/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.