feat(ui): improve keyboard accessibility of book search results#28
Conversation
- Add `role="button"` and `tabindex="0"` to the Google Books search result container. - Add keyboard event listeners (`@keydown.enter.prevent` and `@keydown.space.prevent`) to allow selection via keyboard. - Add an `aria-label` to provide context for screen readers. - Add `focus-visible` utility classes to show a focus ring for keyboard navigation. - Convert the inner `<button>` to a `<span>` to prevent invalid nested interactive elements. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@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. |
|



This PR introduces a micro-UX enhancement by improving the accessibility and keyboard navigation of the Google Books search results in the
BookSearchResult.jscomponent.What:
role="button"andtabindex="0".EnterandSpacewere added to trigger the book selection.aria-labelwas added to give context to screen readers.<button>was changed to a<span>to avoid invalid nested interactive elements since the parent acts as the button.Why:
This change makes the Google Books integration fully accessible for keyboard and screen reader users, allowing them to navigate the results and select a book without relying on a mouse.
Accessibility:
This PR significantly improves keyboard navigation (tabbing and selection) and screen reader support for the external book search functionality.
PR created automatically by Jules for task 1349247917093276225 started by @Tugamer89