Skip to content
Open
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
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2025-10-26 - Importance of Semantic Toggle States
**Learning:** Large interactive elements (like player cards in voting) often act as toggle buttons but are implemented as generic buttons. Adding `aria-pressed` instantly makes the "selected" state accessible to screen readers without needing complex radio group structures.
**Action:** When implementing "select one" or "toggle" interfaces, always verify if `aria-pressed` is needed to communicate the active state.
3 changes: 3 additions & 0 deletions frontend/src/components/game/VotingPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ export function VotingPanel({
{alivePlayers.map((player: Player) => (
<button
key={player.id}
type="button"
aria-pressed={selectedTarget === player.id}
aria-label={`Select ${player.nickname}`}
onClick={() => setSelectedTarget(player.id)}
style={{
display: 'flex',
Expand Down