Skip to content

🎨 Palette: Add keyboard accessibility for hover trailers#10

Closed
google-labs-jules[bot] wants to merge 1 commit intomasterfrom
palette-keyboard-a11y-11792076038738597963
Closed

🎨 Palette: Add keyboard accessibility for hover trailers#10
google-labs-jules[bot] wants to merge 1 commit intomasterfrom
palette-keyboard-a11y-11792076038738597963

Conversation

@google-labs-jules
Copy link

Palette 🎨 added keyboard accessibility to the Hover Trailer plugin.

Why: Previously, trailer previews were only triggered by mouse hover (mouseenter/mouseleave), leaving keyboard users without access to this feature. Additionally, the preview overlay could potentially interfere with keyboard navigation.

What:

  1. Added focusin and focusout event listeners to movie cards.
  2. Implemented logic to check if focus moves within the card (e.g., from card container to a "Play" button inside) to maintain the preview state.
  3. Added aria-hidden="true" and tabindex="-1" to the injected iframe/video elements so they are purely visual/ambient and don't trap focus.

Testing:

  • Verified code changes by inspection of the injected JavaScript logic.
  • Ensured no regression in existing mouse behavior logic (timers and state are shared correctly).

PR created automatically by Jules for task 11792076038738597963 started by @Fovty

- Add `focusin` and `focusout` listeners to movie cards to trigger trailers on keyboard focus.
- Handle `relatedTarget` to prevent preview flickering when navigating inside a card.
- Add `aria-hidden="true"` and `tabindex="-1"` to preview containers (iframe/video) to prevent focus stealing and improve screen reader experience.
@google-labs-jules
Copy link
Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@Fovty Fovty self-assigned this Dec 18, 2025
@Fovty Fovty closed this Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant