Skip to content

🎨 Palette: Add accessibility attributes to WikiCollapsible#43

Open
aicoder2009 wants to merge 2 commits intomainfrom
palette-wiki-collapsible-a11y-12792432945553153807
Open

🎨 Palette: Add accessibility attributes to WikiCollapsible#43
aicoder2009 wants to merge 2 commits intomainfrom
palette-wiki-collapsible-a11y-12792432945553153807

Conversation

@aicoder2009
Copy link
Copy Markdown
Owner

💡 What: Updated the WikiCollapsible component to use React's useId to associate the toggle button with the collapsible content via aria-controls. Also added aria-expanded and visible focus states.
🎯 Why: Screen reader users previously lacked programmatic association between the toggle button and the content it controls, and keyboard users lacked clear visual focus styling when navigating to the button.
♿ Accessibility: Improves accessibility (WCAG 4.1.2 Name, Role, Value and 2.4.7 Focus Visible) for interactive elements across the platform.


PR created automatically by Jules for task 12792432945553153807 started by @aicoder2009

Added `useId` to generate dynamic aria-controls mappings.
Added `aria-expanded` and `focus-visible` styles to the toggle button.
Documented critical UX learning in `.jules/palette.md`.

Co-authored-by: aicoder2009 <[email protected]>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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!

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


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

Copilot AI review requested due to automatic review settings April 30, 2026 10:22
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
opencitation Ready Ready Preview, Comment May 1, 2026 6:11pm

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves WikiCollapsible accessibility by adding ARIA attributes and focus-visible styling, and documents an internal Palette accessibility guideline for interactive widgets.

Changes:

  • Add useId()-generated IDs to link the toggle button to collapsible content via ARIA attributes.
  • Add aria-expanded and focus-visible outline styles to the toggle button.
  • Introduce a Palette note documenting the preferred ARIA ID-mapping pattern.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/components/wiki/wiki-collapsible.tsx Adds ARIA attributes (aria-expanded, aria-controls), stable IDs via useId, and focus-visible styling for the collapsible toggle.
.jules/palette.md Documents a guideline for using useId() to avoid ARIA ID collisions in interactive widgets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<div className="flex items-center justify-between px-4 py-2 border-b border-wiki-border-light bg-wiki-tab-bg">
<span className="font-medium text-sm">{title}</span>
<button
onClick={() => setIsOpen(!isOpen)}
Comment on lines +25 to +27
aria-expanded={isOpen}
aria-controls={isOpen ? contentId : undefined}
className="text-wiki-link text-sm hover:underline focus-visible:outline-dotted focus-visible:outline-1 focus-visible:outline-wiki-text focus-visible:outline-offset-2"
<div className="border border-wiki-border-light bg-wiki-offwhite">
<div className="flex items-center justify-between px-4 py-2 border-b border-wiki-border-light bg-wiki-tab-bg">
<span className="font-medium text-sm">{title}</span>
<button
@aicoder2009 aicoder2009 closed this May 1, 2026
@aicoder2009 aicoder2009 reopened this May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants