🎨 Palette: Hide textual hints in flashcards from screen readers#110
🎨 Palette: Hide textual hints in flashcards from screen readers#110lavkushry wants to merge 1 commit into
Conversation
…readers Converted pseudo-element hints (`::before`/`::after`) on flashcards into actual DOM elements with `aria-hidden="true"`. This prevents screen readers from redundantly announcing visual hints (like "tap to flip ->" or checkmarks) that conflict with or obscure the main content. Co-authored-by: lavkushry <106930153+lavkushry@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request improves accessibility for screen readers by replacing CSS pseudo-elements (::before and ::after) used for textual hints and checkmarks on flashcards with explicit DOM elements that have aria-hidden="true" set. This prevents screen readers from making redundant announcements. Additionally, a new learning entry was added to .jules/palette.md documenting this best practice. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
💡 What
Converted the CSS pseudo-elements (
::afterfor "tap to flip →" and::beforefor the checkmark "✓") on the flashcard component into actual DOM elements.🎯 Why
CSS pseudo-elements cannot be individually hidden from screen readers using
aria-hidden. This meant screen reader users were hearing these visual hints redundantly, which created noise and sometimes conflicted with the main content of the flashcards.📸 Before/After
Visually, the flashcards appear exactly the same. However, the DOM structure has been updated to include
.flashcard__flip-hintand.flashcard__seen-checkelements that map directly to the previous pseudo-element styles.♿ Accessibility
Screen readers will now ignore the visual hint "tap to flip →" and the purely visual seen checkmark "✓", because the new DOM elements have
aria-hidden="true". This reduces noise and improves the overall experience for users relying on assistive technology.PR created automatically by Jules for task 17266414796619069348 started by @lavkushry