improve notification accessibility

- use role="status" for info messages, role="alert" for errors
- add aria-live attribute (polite for info, assertive for errors)
- move phx-click to close button for better keyboard navigation
- add close buttons to shop flash messages
- add aria-hidden to decorative icons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-08 07:53:17 +00:00
parent 8af5cbf41e
commit 5e03dccb69
3 changed files with 62 additions and 19 deletions

View File

@@ -2491,6 +2491,22 @@
color: hsl(0 70% 50%);
}
.shop-flash-close {
margin-left: auto;
padding: 0.25rem;
cursor: pointer;
opacity: 0.5;
transition: opacity 150ms ease;
border-radius: 0.25rem;
&:hover { opacity: 0.8; }
&:focus-visible {
opacity: 1;
outline: 2px solid var(--t-accent);
outline-offset: 2px;
}
}
/* Transition classes for JS.hide flash dismiss */
.fade-out { transition: opacity 200ms ease-out; }
.fade-out-from { opacity: 1; }