Skip to content

fix: add keyboard accessibility to span name and child expander in Trace Timeline#3807

Merged
yurishkuro merged 4 commits into
jaegertracing:mainfrom
swetalin-10:fix/keyboard-accessibility-trace-timeline-3804
May 10, 2026
Merged

fix: add keyboard accessibility to span name and child expander in Trace Timeline#3807
yurishkuro merged 4 commits into
jaegertracing:mainfrom
swetalin-10:fix/keyboard-accessibility-trace-timeline-3804

Conversation

@swetalin-10
Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

Description of the changes

  • SpanBarRow.tsx: Added _detailToggleKeyDown callback and wired it to the span name <a> tag via onKeyDown, so pressing Enter or Space now triggers onDetailToggled the same as a mouse click
  • SpanTreeOffset.tsx: Added _childrenToggleKeyDown handler, tabIndex: 0, and onKeyDown to wrapperProps so the child span expander is reachable via Tab and activatable via Enter or Space

How was this change tested?

  • Manually tabbed through the trace waterfall in the running UI
  • Confirmed that pressing Enter or Space on a focused span name opens the detail panel
  • Confirmed that the child span expander is now reachable via Tab and responds to Enter or Space to expand or collapse child spans

Checklist

AI Usage in this PR (choose one)

See AI Usage Policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Copilot AI review requested due to automatic review settings May 4, 2026 05:47
@swetalin-10 swetalin-10 requested a review from a team as a code owner May 4, 2026 05:47
Copy link
Copy Markdown
Contributor

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

Adds keyboard operability to key controls in the Trace Timeline viewer to address #3804 (span-name detail toggle and child-span expander).

Changes:

  • Add onKeyDown handler to the span-name “switch” so Enter/Space toggles details.
  • Make the child-span expander reachable by keyboard (Tab) and activatable via Enter/Space.

Reviewed changes

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

File Description
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBarRow.tsx Adds keyboard activation for the span-name detail toggle.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.tsx Makes the child expander focusable and keyboard-activatable.

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

@swetalin-10 swetalin-10 force-pushed the fix/keyboard-accessibility-trace-timeline-3804 branch from d4e60e0 to f230d2b Compare May 4, 2026 06:05
yurishkuro
yurishkuro previously approved these changes May 10, 2026
@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label May 10, 2026
Copilot AI review requested due to automatic review settings May 10, 2026 19:56
@yurishkuro yurishkuro enabled auto-merge May 10, 2026 19:56
Copy link
Copy Markdown
Contributor

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

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

Comment on lines +97 to +105
const _detailToggleKeyDown = useCallback(
(e: React.KeyboardEvent) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
onDetailToggled(span.spanID);
}
},
[onDetailToggled, span.spanID]
);
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.59%. Comparing base (fe4b847) to head (7ac570b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3807      +/-   ##
==========================================
+ Coverage   90.58%   90.59%   +0.01%     
==========================================
  Files         333      333              
  Lines       10484    10496      +12     
  Branches     2739     2744       +5     
==========================================
+ Hits         9497     9509      +12     
  Misses        860      860              
  Partials      127      127              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- SpanBarRow: Enter and Space on span-name calls onDetailToggled; other keys do not
- SpanTreeOffset: Enter and Space on wrapper calls onClick; Tab does not; tabIndex=0 set when onClick provided
- SpanTreeOffset: fix ternary indentation per formatter

Signed-off-by: Swetalin Rout <[email protected]>
auto-merge was automatically disabled May 10, 2026 20:25

Head branch was pushed to by a user without write access

@swetalin-10 swetalin-10 requested review from Copilot and yurishkuro May 10, 2026 20:29
@swetalin-10
Copy link
Copy Markdown
Contributor Author

Added tests for keyboard interactions in both SpanBarRow and SpanTreeOffset, and fixed the ternary formatting in SpanTreeOffset.
All Copilot review comments addressed.

Copy link
Copy Markdown
Contributor

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@yurishkuro yurishkuro merged commit 16d58c3 into jaegertracing:main May 10, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Span name and child expander in Trace Timeline cannot be activated via keyboard

3 participants