From 06726303fbdde252f62bbeb857aa5299984a7eb7 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 12 Jan 2026 23:13:15 +0100 Subject: [PATCH 01/15] add proper accessibility text for vault list --- .../mainwindow/VaultListCellController.java | 32 +++++++++++++++++-- src/main/resources/fxml/vault_list.fxml | 2 +- src/main/resources/i18n/strings.properties | 10 ++++++ 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/mainwindow/VaultListCellController.java b/src/main/java/org/cryptomator/ui/mainwindow/VaultListCellController.java index 9324c8c7b..2ff9cef6b 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/VaultListCellController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/VaultListCellController.java @@ -16,6 +16,7 @@ import javafx.beans.value.ObservableValue; import javafx.fxml.FXML; import javafx.geometry.Insets; import javafx.scene.layout.HBox; +import java.util.ResourceBundle; // unscoped because each cell needs its own controller public class VaultListCellController implements FxController { @@ -23,9 +24,12 @@ public class VaultListCellController implements FxController { private static final Insets COMPACT_INSETS = new Insets(6, 12, 6, 12); private static final Insets DEFAULT_INSETS = new Insets(12); + private final ResourceBundle resourceBundle; private final ObjectProperty vault = new SimpleObjectProperty<>(); + private final ObservableValue vaultState; private final ObservableValue glyph; private final ObservableValue compactMode; + private final ObservableValue accessibleText; private AutoAnimator spinAnimation; @@ -35,17 +39,21 @@ public class VaultListCellController implements FxController { public HBox vaultListCell; @Inject - VaultListCellController(Settings settings) { - this.glyph = vault.flatMap(Vault::stateProperty).map(this::getGlyphForVaultState); + VaultListCellController(Settings settings, ResourceBundle resourceBundle) { + this.resourceBundle = resourceBundle; + this.vaultState = vault.flatMap(Vault::stateProperty); + this.glyph = vaultState.map(this::getGlyphForVaultState); + this.accessibleText = vaultState.map(this::getAccessibleTextForVaultState); this.compactMode = settings.compactMode; } public void initialize() { this.spinAnimation = AutoAnimator.animate(Animations.createDiscrete360Rotation(vaultStateView)) // - .onCondition(vault.flatMap(Vault::stateProperty).map(VaultState.Value.PROCESSING::equals).orElse(false)) // + .onCondition(vaultState.map(VaultState.Value.PROCESSING::equals).orElse(false)) // .afterStop(() -> vaultStateView.setRotate(0)) // .build(); this.vaultListCell.paddingProperty().bind(compactMode.map(c -> c ? COMPACT_INSETS : DEFAULT_INSETS)); + this.vaultListCell.accessibleTextProperty().bind(accessibleText); } // TODO deduplicate w/ VaultDetailController @@ -62,6 +70,24 @@ public class VaultListCellController implements FxController { } } + private String getAccessibleTextForVaultState(VaultState.Value state) { + if (state != null) { + var translationKey = switch (state) { + case LOCKED -> "vault.state.locked"; + case PROCESSING -> "vault.state.processing"; + case UNLOCKED -> "vault.state.unlocked"; + case NEEDS_MIGRATION -> "vault.state.migrationNeeded"; + case MISSING -> "vault.state.missing"; + case VAULT_CONFIG_MISSING, ALL_MISSING, ERROR -> "vault.state.error"; + }; + + var localizedState = resourceBundle.getString(translationKey); + return resourceBundle.getString("main.vaultlist.listEntry").formatted(vault.get().getDisplayName(), localizedState); + } else { + return ""; + } + } + /* Getter/Setter */ public ObservableValue glyphProperty() { diff --git a/src/main/resources/fxml/vault_list.fxml b/src/main/resources/fxml/vault_list.fxml index a05d834a3..ca30d180e 100644 --- a/src/main/resources/fxml/vault_list.fxml +++ b/src/main/resources/fxml/vault_list.fxml @@ -22,7 +22,7 @@ - + diff --git a/src/main/resources/i18n/strings.properties b/src/main/resources/i18n/strings.properties index 897fbd7da..b562da01c 100644 --- a/src/main/resources/i18n/strings.properties +++ b/src/main/resources/i18n/strings.properties @@ -18,6 +18,14 @@ generic.button.next=Next generic.button.print=Print generic.button.remove=Remove +## Vault state +vault.state.locked=Locked +vault.state.unlocked=Unlocked +vault.state.missing=Missing +vault.state.migrationNeeded=Migration required +vault.state.processing=Processing +vault.state.error=Error + # Error error.message=An error occurred error.description=Cryptomator didn't expect this to happen. You can look up existing solutions for this error. Or if it has not been reported yet, feel free to do so. @@ -402,6 +410,8 @@ stats.access.total=Total accesses: %d # Main Window ## Vault List +main.vaultlist=Vaults +main.vaultlist.listEntry=Vault %s. %s main.vaultlist.emptyList.onboardingInstruction=Click here to add a vault main.vaultlist.contextMenu.remove=Remove… main.vaultlist.contextMenu.lock=Lock From a50e372f05255d5c42dd0fa99d94758f8c927cc8 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 12 Jan 2026 23:14:09 +0100 Subject: [PATCH 02/15] add correct accessible role to dialogs --- src/main/resources/fxml/lock_forced.fxml | 3 ++- src/main/resources/fxml/quit.fxml | 3 ++- src/main/resources/fxml/simple_dialog.fxml | 3 ++- src/main/resources/fxml/unlock_enter_password.fxml | 3 ++- src/main/resources/fxml/unlock_success.fxml | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/resources/fxml/lock_forced.fxml b/src/main/resources/fxml/lock_forced.fxml index 14f801fba..66cbf4148 100644 --- a/src/main/resources/fxml/lock_forced.fxml +++ b/src/main/resources/fxml/lock_forced.fxml @@ -19,7 +19,8 @@ maxWidth="500" minHeight="145" spacing="12" - alignment="TOP_LEFT"> + alignment="TOP_LEFT" + accessibleRole="DIALOG"> diff --git a/src/main/resources/fxml/quit.fxml b/src/main/resources/fxml/quit.fxml index f0d6ce9b6..c8694761d 100644 --- a/src/main/resources/fxml/quit.fxml +++ b/src/main/resources/fxml/quit.fxml @@ -19,7 +19,8 @@ maxWidth="400" minHeight="145" spacing="12" - alignment="TOP_LEFT"> + alignment="TOP_LEFT" + accessibleRole="DIALOG"> diff --git a/src/main/resources/fxml/simple_dialog.fxml b/src/main/resources/fxml/simple_dialog.fxml index 0e9b01776..383405018 100644 --- a/src/main/resources/fxml/simple_dialog.fxml +++ b/src/main/resources/fxml/simple_dialog.fxml @@ -17,7 +17,8 @@ minWidth="400" maxWidth="400" minHeight="145" - spacing="12"> + spacing="12" + accessibleRole="DIALOG"> diff --git a/src/main/resources/fxml/unlock_enter_password.fxml b/src/main/resources/fxml/unlock_enter_password.fxml index 5242826a2..bcf1bfa37 100644 --- a/src/main/resources/fxml/unlock_enter_password.fxml +++ b/src/main/resources/fxml/unlock_enter_password.fxml @@ -18,7 +18,8 @@ minWidth="400" maxWidth="400" minHeight="145" - spacing="12"> + spacing="12" + accessibleRole="DIALOG"> diff --git a/src/main/resources/fxml/unlock_success.fxml b/src/main/resources/fxml/unlock_success.fxml index ae1b8185e..029bb96d3 100644 --- a/src/main/resources/fxml/unlock_success.fxml +++ b/src/main/resources/fxml/unlock_success.fxml @@ -21,7 +21,8 @@ maxWidth="400" minHeight="145" spacing="12" - alignment="TOP_LEFT"> + alignment="TOP_LEFT" + accessibleRole="DIALOG"> From a06accb80f5522f0f925c1bc409168010d93ae29 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 12 Jan 2026 23:15:40 +0100 Subject: [PATCH 03/15] add accessibletext to vault storage location --- src/main/resources/fxml/vault_detail.fxml | 2 +- src/main/resources/i18n/strings.properties | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/fxml/vault_detail.fxml b/src/main/resources/fxml/vault_detail.fxml index cfae48d8b..141933b94 100644 --- a/src/main/resources/fxml/vault_detail.fxml +++ b/src/main/resources/fxml/vault_detail.fxml @@ -36,7 +36,7 @@