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
Expand Up @@ -29,3 +29,6 @@
## 2024-07-12 - [Dynamic Accessibility Labels for List Item Actions]
**Learning:** Icon-only buttons (like Edit/Delete) inside lists pose a major accessibility challenge for VoiceOver users when identical labels ("Edit") are repeated without context, making it impossible to know which row is being acted on.
**Action:** Always interpolate the dynamic item context (e.g., `item.name`) into both `.help()` tooltips and `.accessibilityLabel()` modifiers in repeated SwiftUI lists. Include fallback text for empty states (e.g., `"Unnamed Item"`).
## 2024-05-24 - [Accessible List Items]
**Learning:** Using `.onTapGesture` on list items or cards in SwiftUI breaks keyboard interactivity and drops standard accessibility traits. It prevents users from tabbing to the item or pressing Space/Enter to activate it.
**Action:** When making elements interactive, wrap them in a `Button` with `.buttonStyle(.plain)` instead of using `.onTapGesture`. This natively supports keyboard navigation and correctly propagates `.help()` and `.accessibilityLabel()` to screen readers.
Comment on lines +32 to +34

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix chronological order and update the date.

This new entry is appended below the 2024-07-12 entry, breaking reverse-chronological order. Additionally, the date is set to 2024-05-24.

Please consider updating the date to reflect the current PR date (e.g., 2026-07-15) and moving this entry to the top of the file to maintain consistent reverse-chronological ordering.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.Jules/palette.md around lines 32 - 34, Update the “Accessible List Items”
entry in palette.md to use the current PR date, such as 2026-07-15, and move the
complete entry above the 2024-07-12 entry so the file remains in
reverse-chronological order.

Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ struct ScriptExamplesGalleryView: View {
ScrollView {
LazyVGrid(columns: columns, spacing: 12) {
ForEach(ScriptExamplesData.all) { example in
ExampleCard(example: example)
.onTapGesture {
onSelect(example)
dismiss()
}
Button(action: {
onSelect(example)
dismiss()
}) {
ExampleCard(example: example)
}
.buttonStyle(.plain)
.help("Use \(example.name) example")
.accessibilityLabel("Use \(example.name) example")
}
}
.padding()
Expand Down
Loading