Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2024-10-24 - Accessible Icon Props and Loading Button State

**Learning:** Svelte wrapper components (like `Icon.svelte`) must spread `$$restProps` to allow passing accessibility attributes (e.g., `aria-label`) from parent components. Without this, icons remain inaccessible to screen readers. Also, persistent "Success" states on buttons can be confusing; auto-resetting them after a timeout improves clarity.
**Action:** Always include `{...$$restProps}` in wrapper components and implement auto-reset logic for temporary success states in interactive elements.

## 2024-11-20 - Accessible Menu Triggers

**Learning:** Interactive trigger elements that open SMUI menus lack native screen reader context for their expanded state.
**Action:** Ensure elements that trigger SMUI menus include `aria-haspopup="menu"` and bind `aria-expanded` to the state variable that tracks the menu's open status.
7 changes: 6 additions & 1 deletion src/routes/WalletConnectButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@
export let connectButtonVariant: 'raised' | 'unelevated' | 'outlined' = 'raised';
</script>

<Button variant={connectButtonVariant} on:click={toggleMenu}>
<Button
variant={connectButtonVariant}
on:click={toggleMenu}
aria-haspopup="menu"
aria-expanded={toggleOpen}
>
<slot name="buttonLabel">Connect</slot>
</Button>
<Menu
Expand Down