Skip to content

🎨 Palette: Improve Telemetry Table Accessibility and State#14

Draft
igor-holt wants to merge 1 commit intomainfrom
palette-telemetry-ux-11149898863500697601
Draft

🎨 Palette: Improve Telemetry Table Accessibility and State#14
igor-holt wants to merge 1 commit intomainfrom
palette-telemetry-ux-11149898863500697601

Conversation

@igor-holt
Copy link
Owner

💡 What:

  • Added a friendly "No telemetry data available" empty state to the Telemetry Timeline component.
  • Enhanced the telemetry data table with scope="col" and scope="row" attributes for better screen reader navigation.
  • Added a hidden <caption> for the table.
  • Added a hover effect to table rows to improve visual tracking.
  • Added a reusable .sr-only utility class to global styles.

🎯 Why:

  • Empty State: Prevents a broken UI experience when data is missing and guides the user.
  • Accessibility: Tables are complex for screen reader users; proper scopes and captions provide essential context.
  • Usability: Row hover effects make it easier to read wide tables.

📸 Before/After:
(Visual changes are subtle: hover effect added, empty state visible when data is missing. Structural changes are significant for assistive tech.)

♿ Accessibility:

  • Added scope="col" to all headers.
  • Converted the "Log ID" column to a row header (<th scope="row">) for better context.
  • Added an sr-only caption "Telemetry Event Log".

PR created automatically by Jules for task 11149898863500697601 started by @igor-holt

- Add empty state handling for TelemetryTimeline when data is missing
- Improve table accessibility with scope attributes and captions
- Add hover effect to table rows for better readability
- Add .sr-only utility class for screen reader support

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link

👋 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 February 14, 2026 01:10
@gemini-code-assist
Copy link

Summary of Changes

Hello @igor-holt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience and accessibility of the Telemetry Timeline component. It addresses scenarios where data might be absent by providing a clear empty state, and it makes the data table much more navigable and understandable for users relying on screen readers. Additionally, it improves general usability with visual cues and introduces a foundational accessibility utility for future use.

Highlights

  • Accessibility Enhancements: Improved the telemetry data table's accessibility for screen readers by adding scope="col" and scope="row" attributes, and including a hidden <caption>.
  • Empty State Handling: Implemented a user-friendly 'No telemetry data available' empty state for the Telemetry Timeline component to prevent broken UI experiences.
  • Usability Improvements: Added a hover effect to table rows in the telemetry data table to enhance visual tracking and readability.
  • Reusable Utility Class: Introduced a reusable .sr-only utility class to global styles for semantically hiding content from visual users while keeping it available for assistive technologies.
Changelog
  • .Jules/palette.md
    • Added learning notes on converting the first cell of a table row to <th scope="row"> for screen reader context.
    • Added learning notes on the importance and implementation of an .sr-only utility class for hidden descriptions.
  • app/globals.css
    • Added a .sr-only CSS utility class for visually hiding content while keeping it accessible to screen readers.
    • Added hover styles (background-color and transition) for rows within tables with the class .telemetry-table.
  • components/TelemetryTimeline.tsx
    • Implemented a conditional rendering for an empty state message ("No telemetry data available") when chartData is missing or empty.
    • Applied the telemetry-table class to the main table element.
    • Added a visually hidden <caption> element with the text "Telemetry Event Log" using the sr-only class.
    • Updated all <th> elements in the table header to include scope="col".
    • Converted the <td> for entry.logId into a <th> with scope="row" and applied font-weight: normal for visual consistency.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@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 significantly improves the Telemetry Timeline component by adding a proper empty state and enhancing table accessibility with scope attributes and a screen-reader-only caption. These are excellent changes for usability and accessibility. My review includes a few suggestions to further improve code maintainability by refactoring a small amount of code duplication, moving inline styles to the global stylesheet, and using CSS variables for colors.


/* Telemetry Table Enhancements */
.telemetry-table tr:hover {
background-color: #f5f5f5;

Choose a reason for hiding this comment

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

medium

The hardcoded color #f5f5f5 makes it difficult to manage themes or make global style changes. Consider defining colors as CSS variables in the :root selector and reusing them. This would improve maintainability across the project.

For example:

:root {
  --color-background-hover: #f5f5f5;
  /* other colors */
}

.telemetry-table tr:hover {
  background-color: var(--color-background-hover);
  /* ... */
}

This practice could be extended to other hardcoded colors in the application, like those in TelemetryTimeline.tsx.

Comment on lines +20 to +31
if (!chartData || chartData.length === 0) {
return (
<div style={{ padding: '20px' }}>
<Card>
<h2>Telemetry Timeline</h2>
<div style={{ padding: '40px', textAlign: 'center', color: '#666' }}>
<p>No telemetry data available. Check back later!</p>
</div>
</Card>
</div>
);
}

Choose a reason for hiding this comment

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

medium

There's some code duplication between the empty state and the data-filled state. The outer div, the Card component, and the h2 title are repeated. You can refactor this to remove the duplication by moving the conditional logic inside the Card, making the component cleaner and easier to maintain.

For example:

return (
  <div style={{ padding: '20px' }}>
    <Card>
      <h2>Telemetry Timeline</h2>
      {(!chartData || chartData.length === 0) ? (
        <div style={{ padding: '40px', textAlign: 'center', color: '#666' }}>
          <p>No telemetry data available. Check back later!</p>
        </div>
      ) : (
        <>
          {/* Chart and Table here */}
        </>
      )}
    </Card>
  </div>
);

{/* Optional: Raw Table for Details */}
<div style={{ overflowX: 'auto' }}>
<table style={{ width: '100%', borderCollapse: 'collapse' }}>
<table className="telemetry-table" style={{ width: '100%', borderCollapse: 'collapse' }}>

Choose a reason for hiding this comment

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

medium

Great job adding the telemetry-table class! To further improve maintainability and separate concerns, consider moving all the inline styles from the <table> and its children (<tr>, <th>, <td>) to the app/globals.css file. This will centralize your styling and make the component's JSX cleaner.

For example, you could remove the style props and add this to your CSS:

.telemetry-table {
  width: 100%;
  border-collapse: collapse;
}
.telemetry-table th, .telemetry-table td {
  padding: 10px;
}
.telemetry-table th {
  text-align: left;
}
.telemetry-table thead tr {
  border-bottom: 2px solid #ddd;
}
.telemetry-table tbody tr {
  border-bottom: 1px solid #ddd;
}
.telemetry-table tbody th {
  font-weight: normal;
}

Copy link

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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