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
4 changes: 4 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 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-10-25 - ARIA Attributes for Interactive SMUI Trigger Elements
**Learning:** When using SMUI components like `<Button>` to trigger a dropdown or menu (like the Wallet Connect button), you must manually add `aria-haspopup="menu"` and bind `aria-expanded` to the component's open state variable to ensure proper keyboard and screen reader accessibility.
**Action:** Always verify that interactive trigger elements for menus/dropdowns have correct ARIA roles and state attributes.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ node_modules
pnpm-lock.yaml
package-lock.json
yarn.lock
.jules
static
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