make the transaction status a tab stop, name the fee and locktime fields in the transaction tab, and name the notification close button
What changed, and why it matters
This commit improves accessibility for users who rely on screen readers. It adds spoken labels to transaction status, fee fields, locktime options, and the notification close button. There is no security vulnerability or exploit here.
No security action needed. Treat as a routine accessibility improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch makes minor JavaFX accessibility changes: binding accessibleText properties so screen readers announce meaningful labels, setting focus traversal on the transaction status label, and assigning accessible text to notification close buttons and locktime/fee fields. No logic affecting cryptography, transaction validation, networking, or permissions is modified.
Changed components
AppController.java notification close button accessibilityLabelledFieldSkin.java accessible text bindingHeadersController.java transaction status focus/accessibilityheaders.fxml locktime and fee field accessible labelsinput.fxml locktime toggle accessible labelsInspect captured patch +17 / −8
### src/main/java/com/sparrowwallet/sparrow/AppController.java
@@ -2965,6 +2965,10 @@ public void newWalletTransactions(NewWalletTransactionsEvent event) {
}
notificationBuilder.show();
+ //The notification's close button shows only an icon
+ Platform.runLater(() -> Window.getWindows().stream().filter(window -> window instanceof Popup && window.getScene() != null)
+ .map(window -> window.getScene().getRoot().lookup(".notification-bar .close-button")).filter(Objects::nonNull)
+ .forEach(closeButton -> closeButton.setAccessibleText("Close")));
}
}
}
### src/main/java/com/sparrowwallet/sparrow/control/LabelledFieldSkin.java
@@ -14,6 +14,7 @@
/**
* Field skin that links the field's label to its input, so screen readers announce the label with the input.
+ * A field's accessible text, where set, is spoken for the label in place of its visible text.
* Applied to every field with -fx-skin in general.css.
*/
public class LabelledFieldSkin extends FieldSkin {
@@ -26,6 +27,7 @@ public LabelledFieldSkin(Field field) {
label = (Label)field.getLabelContainer().getChildren().getFirst();
field.getInputs().addListener(labelForListener);
field.textProperty().addListener(labelForListener);
+ label.accessibleTextProperty().bind(field.accessibleTextProperty());
updateLabelFor();
}
@@ -34,6 +36,7 @@ public void dispose() {
getSkinnable().getInputs().removeListener(labelForListener);
getSkinnable().textProperty().removeListener(labelForListener);
unwatchVisibility();
+ label.accessibleTextProperty().unbind();
label.setLabelFor(null);
super.dispose();
}
### src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java
@@ -507,6 +507,8 @@ public LocalDate fromString(String value) {
blockStatus.accessibleTextProperty().bind(Bindings.concat("Transaction status: ", blockStatus.textProperty()));
//A read-only text field rather than text, as VoiceOver keeps reading the first value it saw of text that later changes
blockStatus.setAccessibleRole(AccessibleRole.TEXT_FIELD);
+ //A Tab stop, as confirmations are not announced as they arrive and the status is otherwise reached only once, on broadcast
+ blockStatus.setFocusTraversable(true);
broadcastButton.managedProperty().bind(broadcastButton.visibleProperty());
showTransactionButton.managedProperty().bind(showTransactionButton.visibleProperty());
### src/main/resources/com/sparrowwallet/sparrow/transaction/headers.fxml
@@ -111,9 +111,9 @@
<ToggleGroup fx:id="locktimeToggleGroup" />
</toggleGroup>
<buttons>
- <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeNoneType" text="Disabled" userData="none" toggleGroup="$locktimeToggleGroup" />
- <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeBlockType" text="Block" userData="block" toggleGroup="$locktimeToggleGroup" />
- <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeDateType" text="Date" userData="date" toggleGroup="$locktimeToggleGroup" />
+ <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeNoneType" text="Disabled" accessibleText="Locktime: Disabled" userData="none" toggleGroup="$locktimeToggleGroup" />
+ <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeBlockType" text="Block" accessibleText="Locktime: Block" userData="block" toggleGroup="$locktimeToggleGroup" />
+ <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeDateType" text="Date" accessibleText="Locktime: Date" userData="date" toggleGroup="$locktimeToggleGroup" />
</buttons>
</SegmentedButton>
</Field>
@@ -166,10 +166,10 @@
<Form GridPane.columnIndex="1" GridPane.rowIndex="2" styleClass="details-lower">
<Fieldset text="Fee" inputGrow="SOMETIMES">
- <Field text="Amount:">
+ <Field text="Amount:" accessibleText="Fee amount:">
<CopyableCoinLabel fx:id="fee" />
</Field>
- <Field text="Rate:">
+ <Field text="Rate:" accessibleText="Fee rate:">
<CopyableLabel fx:id="feeRate" />
</Field>
</Fieldset>
### src/main/resources/com/sparrowwallet/sparrow/transaction/input.fxml
@@ -101,17 +101,17 @@
<ToggleGroup fx:id="locktimeToggleGroup" />
</toggleGroup>
<buttons>
- <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeNoneType" text="Disabled" userData="none" toggleGroup="$locktimeToggleGroup">
+ <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeNoneType" text="Disabled" accessibleText="Locktime: Disabled" userData="none" toggleGroup="$locktimeToggleGroup">
<tooltip>
<Tooltip text="Disable time locks"/>
</tooltip>
</ToggleButton>
- <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeAbsoluteType" text="Absolute" userData="absolute" toggleGroup="$locktimeToggleGroup">
+ <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeAbsoluteType" text="Absolute" accessibleText="Locktime: Absolute" userData="absolute" toggleGroup="$locktimeToggleGroup">
<tooltip>
<Tooltip text="Enable absolute (transaction level) time lock only"/>
</tooltip>
</ToggleButton>
- <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeRelativeType" text="Relative" userData="relative" toggleGroup="$locktimeToggleGroup">
+ <ToggleButton accessibleRole="RADIO_BUTTON" fx:id="locktimeRelativeType" text="Relative" accessibleText="Locktime: Relative" userData="relative" toggleGroup="$locktimeToggleGroup">
<tooltip>
<Tooltip text="Enable both absolute and relative time locks"/>
</tooltip>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.