Skip to content

Commit f440f26

Browse files
authored
🎨 Palette: Improve accessibility of background tasks during error states (#148)
1 parent b1a96cd commit f440f26

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎.jules/palette.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@
77
## 2024-04-16 - Accessible Error State Management
88
**Learning:** Background process errors (like file watcher JSON parsing) need accessible visual cues via the status bar, and users need an interactive path to dismiss these error states (e.g. by clicking to open logs).
99
**Action:** Always wrap background processes with accessible error state triggers (`setError(true)`) and ensure the associated UI element's command can clear the error state.
10+
11+
## 2024-04-22 - Visual representation of background tasks in error states
12+
**Learning:** Users and screen readers lose visibility of active background synchronization if an unacknowledged persistent error state entirely overrides the status bar.
13+
**Action:** When overlapping states occur, dynamically combine icons and accessibility labels (e.g., error and active sync) to ensure both critical conditions remain visible.

‎src/ledgermind/vscode/src/extension.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ export function activate(context: vscode.ExtensionContext) {
2929

3030
const updateStatusBar = () => {
3131
if (isError) {
32-
statusBarItem.text = '$(error) LedgerMind';
33-
statusBarItem.tooltip = 'LedgerMind: Sync Error (Click to view logs)';
34-
statusBarItem.accessibilityInformation = { label: 'LedgerMind Sync Error, click to view logs', role: 'button' };
32+
statusBarItem.text = busyCount > 0 ? '$(sync~spin) $(error) LedgerMind' : '$(error) LedgerMind';
33+
statusBarItem.tooltip = busyCount > 0 ? 'LedgerMind: Sync Error (Syncing...) (Click to view logs)' : 'LedgerMind: Sync Error (Click to view logs)';
34+
statusBarItem.accessibilityInformation = { label: busyCount > 0 ? 'LedgerMind Sync Error and Syncing Context, click to view logs' : 'LedgerMind Sync Error, click to view logs', role: 'button' };
3535
statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.errorBackground');
3636
} else if (busyCount > 0) {
3737
statusBarItem.backgroundColor = undefined;

0 commit comments

Comments
 (0)