Skip to content

🎨 Palette: Improve accessibility of scrollable output regions#3523

Draft
EffortlessSteven wants to merge 1 commit intomainfrom
palette-output-regions-15736208067410586540
Draft

🎨 Palette: Improve accessibility of scrollable output regions#3523
EffortlessSteven wants to merge 1 commit intomainfrom
palette-output-regions-15736208067410586540

Conversation

@EffortlessSteven
Copy link
Copy Markdown
Member

💡 What: Converted generic <div> output blocks with overflow-y: auto to use role="region", tabindex="0", and aria-labelledby linked to <div> labels instead of <label> tags.
🎯 Why: <label> tags are only valid for labellable form controls. Screen readers may ignore them when paired with generic <div> elements. Making the scrollable regions focusable ensures keyboard users can scroll them.
📸 Before/After: Visuals are identical, but under the hood, the markup correctly associates the "labels" with their respective content areas for assistive technologies.
♿ Accessibility: Ensures that keyboard-only users can focus and scroll through long model generation outputs, and that screen readers correctly announce the region names.


PR created automatically by Jules for task 15736208067410586540 started by @EffortlessSteven

💡 What: Converted generic `<div>` output blocks with `overflow-y: auto` to use `role="region"`, `tabindex="0"`, and `aria-labelledby` linked to `<div>` labels instead of `<label>` tags.
🎯 Why: `<label>` tags are only valid for labellable form controls. Screen readers may ignore them when paired with generic `<div>` elements. Making the scrollable regions focusable ensures keyboard users can scroll them.
📸 Before/After: Visuals are identical, but under the hood, the markup correctly associates the "labels" with their respective content areas for assistive technologies.
♿ Accessibility: Ensures that keyboard-only users can focus and scroll through long model generation outputs, and that screen readers correctly announce the region names.
@google-labs-jules
Copy link
Copy Markdown

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dd509d03-777f-47b8-8c51-ff5b9b40aa82

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-output-regions-15736208067410586540

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the accessibility of scrollable output regions in the WASM browser examples by replacing improper tags with ARIA-compliant role="region" containers and adding tabindex="0" for keyboard navigation. Feedback includes correcting an unexpanded shell command in the documentation and recommending custom focus styles for the output regions to ensure the focus indicator is visible against dark backgrounds.

Comment thread .jules/palette.md
## 2024-05-22 - Keyboard Navigation in Custom Tabs
**Learning:** Custom tab implementations using ARIA roles (`tablist`, `tab`) often miss the expected keyboard interaction pattern (arrow keys to navigate), making them inaccessible to keyboard users despite having semantic roles.
**Action:** Always implement a `keydown` handler for custom tab components to support ArrowRight/ArrowLeft/Home/End navigation and automatic activation.
## $(date +%Y-%m-%d) - Accessible Scrollable Regions
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The date header contains an unexpanded shell command placeholder $(date +%Y-%m-%d). This should be replaced with the actual date to ensure the journal is correctly formatted and readable in markdown viewers.

Suggested change
## $(date +%Y-%m-%d) - Accessible Scrollable Regions
## 2024-05-22 - Accessible Scrollable Regions

<label>Streaming Output:</label>
<div id="streaming-output" class="streaming-output">Streaming output will appear here...</div>
<div id="streaming-output-label" class="fake-label">Streaming Output:</div>
<div id="streaming-output" class="streaming-output" role="region" aria-labelledby="streaming-output-label" tabindex="0">Streaming output will appear here...</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Adding tabindex="0" to the streaming output region is good for accessibility. However, because this region has a black background, the default browser focus indicator may be invisible or very difficult to see. Please add a custom focus style in your CSS (e.g., .streaming-output:focus-visible { outline: 2px solid #00ff00; }) to ensure keyboard users can clearly identify when the region is focused.

<label>Streaming Output:</label>
<div id="streaming-output" class="streaming-output">Streaming output will appear here...</div>
<div id="streaming-output-label" class="fake-label">Streaming Output:</div>
<div id="streaming-output" class="streaming-output" role="region" aria-labelledby="streaming-output-label" tabindex="0">Streaming output will appear here...</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Adding tabindex="0" to the streaming output region is good for accessibility. However, because this region has a black background, the default browser focus indicator may be invisible or very difficult to see. Please add a custom focus style in your CSS (e.g., .streaming-output:focus-visible { outline: 2px solid #00ff00; }) to ensure keyboard users can clearly identify when the region is focused.

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.

1 participant