Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .jules/picasso.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ Added aria-hidden='true' wrapper to decorative emojis across navigation and head
- Added `<span aria-hidden="true">` to `🏢` and `🔨` in `CaseStudies.tsx` tab buttons.
**Learning:** Always use `<span aria-hidden="true">` around decorative emojis to prevent screen readers from redundantly reading out their unicode representations (e.g. "building", "hammer") which distracts from the core button text.
Learned that missing aria labels for decorative emojis in React can be fixed by wrapping them with <span aria-hidden='true'></span> and fixing text assertions in React Testing Library using getByRole instead of getByText
- Added `aria-hidden='true'` to the decorative phase icon in `ExerciseCard.tsx`.
- Added `focus-visible` utility classes to the close button in `KeyboardShortcutsOverlay.tsx` to improve keyboard navigation.
2 changes: 1 addition & 1 deletion src/components/ExerciseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function ExerciseCard({ exercise }: ExerciseCardProps) {
>
<div className="exercise-card__header">
<span className="exercise-card__phase">
{icon} Phase {exercise.phase}
<span aria-hidden="true">{icon}</span> Phase {exercise.phase}
</span>
<span className="difficulty-badge" style={{ color: diff.color, background: diff.bg }}>
{diff.label}
Expand Down
2 changes: 1 addition & 1 deletion src/components/KeyboardShortcutsOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default function KeyboardShortcutsOverlay() {
<h2 id="keyboard-shortcuts-title">Keyboard shortcuts</h2>
<button
type="button"
className="shortcut-overlay-close"
className="shortcut-overlay-close focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
data-shortcuts-close
onClick={() => setIsOpen(false)}
aria-label="Close keyboard shortcuts"
Expand Down
Loading