add accessible text to improve screen reader navigation

This commit is contained in:
Craig Raw 2025-05-08 10:10:50 +02:00
parent 1b0e5e9726
commit e697313259
4 changed files with 4 additions and 2 deletions

View file

@ -21,7 +21,7 @@ public class WelcomeDialog extends Dialog<Mode> {
welcomeController.initializeView();
dialogPane.setPrefWidth(600);
dialogPane.setPrefHeight(520);
dialogPane.setPrefHeight(540);
dialogPane.setMinHeight(dialogPane.getPrefHeight());
AppServices.moveToActiveWindowScreen(this);

View file

@ -321,6 +321,7 @@ public class MnemonicKeystorePane extends TitledDescriptionPane {
}
};
wordField.setMaxWidth(100);
wordField.setAccessibleText("Word " + (wordNumber + 1));
TextFormatter<?> formatter = new TextFormatter<>((TextFormatter.Change change) -> {
String text = change.getText();
// if text was added, fix the text to fit the requirements

View file

@ -25,6 +25,7 @@ public class TitledDescriptionPane extends TitledPane {
public TitledDescriptionPane(String title, String description, String content, WalletModel walletModel) {
getStylesheets().add(AppServices.class.getResource("general.css").toExternalForm());
getStyleClass().add("titled-description-pane");
setAccessibleText(title);
setPadding(Insets.EMPTY);
setGraphic(getTitle(title, description, walletModel));

View file

@ -20,7 +20,7 @@
<Region HBox.hgrow="ALWAYS"/>
<DialogImage type="SPARROW" AnchorPane.rightAnchor="0"/>
</HBox>
<VBox fx:id="welcomeBox" styleClass="content-area" spacing="20" prefHeight="370">
<VBox fx:id="welcomeBox" styleClass="content-area" spacing="20" prefHeight="390">
<VBox fx:id="step1" spacing="15">
<Label text="Introduction" styleClass="title-text">
<graphic>