Skip to content

fix(a11y): fix traces page accessibility violations — rowgroup tabbable - #13744

Merged
viktoravelino merged 35 commits into
release-1.11.0from
LE-1611
Jul 6, 2026
Merged

fix(a11y): fix traces page accessibility violations — rowgroup tabbable#13744
viktoravelino merged 35 commits into
release-1.11.0from
LE-1611

Conversation

@olayinkaadelakun

@olayinkaadelakun olayinkaadelakun commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Sets tabindex on AG Grid rows in the traces table via onFirstDataRendered / onRowDataUpdated callbacks, resolving the IBM accessibility checker violation "None of the descendant elements with rowgroup role is tabbable"
  • Adds aria-label to the traces TableComponent so screen readers announce the grid with a meaningful name
  • Adds an onCellKeyDown handler so keyboard users can open trace detail with the Enter key
  • Adds ensureDomOrder: true to the base TableComponent gridOptions so screen readers traverse rows in visual order
  • Adds aria-label to the status filter SelectTrigger, fixing the Lighthouse button-name critical violation (WCAG 4.1.2)
  • Change AlertTitle from h5 to div in alert.tsx, fixing the Lighthouse heading-order violation caused by an h2 → h5 jump in the empty state
  • Adds trace.tableAriaLabel and trace.statusFilterLabel i18n keys to all 7 locale files

Test plan

  • Run IBM Equal Access Accessibility Checker on the Traces page — confirm rowgroup violation is resolved
  • Run Lighthouse accessibility audit — confirm button-name and heading-order no longer fail
  • Tab into the traces table, navigate rows with arrow keys, press Enter to open a trace — confirm keyboard flow works
  • Confirm the status filter dropdown is announced correctly by a screen reader
  • Confirm no visual regression on the empty state alert across the app

Summary by CodeRabbit

  • New Features

    • Added new accessibility and testing guidance documents for Level 1 compliance checks and audit tracking.
    • Expanded trace view labels and controls with localized text for filtering, table labeling, and span expand/collapse actions.
  • Bug Fixes

    • Improved keyboard access in trace tables, including row navigation with Enter and better focus handling.
    • Added accessible labels for copy-code actions, status filters, dialogs, and expandable trace items.
    • Updated some UI headings/alerts to use more appropriate semantics for assistive technologies.
  • Documentation

    • Added a clear accessibility requirements and testing reference for future checks.

viktoravelino and others added 20 commits June 9, 2026 13:18
- Added `accessibility-checker` package to the project dependencies.
- Enhanced test fixtures to include accessibility scanning capabilities.
- Implemented `runA11yScan` method in the `LangflowPage` type for running accessibility checks.
- Created utility functions for building accessibility scan labels, formatting failure messages, and generating summary attachments.
- Updated test setup to manage accessibility sessions and assert compliance based on scan results.
* test: add component a11y unit tests (jest-axe)

Cover 14 components in two waves. 16 tests fail by design - each
encodes a known gap from a11y-action-plan (phases 0-3) and flips to
a regression lock once the component fix lands. 23 tests pass as
regression locks for already-correct semantics.

* ci: split a11y unit tests into separate workflow

Main jest CI excludes *.a11y.test.* so known-gap failures don't
block PRs; new a11y-unit-tests.yml runs them as informational check.

* fix(a11y): resolve component gaps flagged by a11y unit tests

Fixes all 16 failing jest-axe gap tests:
- TableHead defaults scope=col
- alert display area gets aria-live region
- app header becomes <header> landmark; bell button labeled
- icon wrapper decorative by default (aria-hidden), ariaLabel opt-in
- Input drops wrapping <label> (name pollution) and hides placeholder span
- password toggle back in tab order with aria-label/aria-pressed
- CheckBoxDiv exposes checkbox role + state
- accordion trigger renders native Radix button
- dialogs focus container on open instead of suppressing autofocus
- full-screen modal exposes dialog role/aria-modal/ariaLabel
- flow list card focusable with keyboard activation

Also wraps test focus calls in act() and mocks the icon loader so
the a11y suite runs without React warnings.

* fix: skip Puppeteer Chrome download in remaining Dockerfiles

frontend and base images still ran bare npm install; puppeteer (via
accessibility-checker, test-only) tried to fetch Chrome and broke the
Docker image build in CI.

* test: extend a11y unit test coverage (jest-axe)

Adds axe + semantics tests for untested primitives (button, alert,
textarea, radio-group, dropdown-menu, tooltip, popover) and two
known-gap tests that fail by design until fixes land:
- copyFieldAreaComponent copy action is a bare div onClick (plan 2.4)
- DialogContentWithouFixed renders an empty fragment (plan 1.6)

* fix: make webhook copy field a real button (a11y)

Copy action was a bare div onClick - no role, name, or keyboard
support (a11y-action-plan 2.4). Drops the no-longer-needed
DialogContentWithouFixed known-gap test.

* feat: update a11y unit tests and improve accessibility semantics in components

* feat: enable pull request trigger for a11y scan workflow
* test: add component a11y unit tests (jest-axe)

Cover 14 components in two waves. 16 tests fail by design - each
encodes a known gap from a11y-action-plan (phases 0-3) and flips to
a regression lock once the component fix lands. 23 tests pass as
regression locks for already-correct semantics.

* ci: split a11y unit tests into separate workflow

Main jest CI excludes *.a11y.test.* so known-gap failures don't
block PRs; new a11y-unit-tests.yml runs them as informational check.

* fix(a11y): resolve component gaps flagged by a11y unit tests

Fixes all 16 failing jest-axe gap tests:
- TableHead defaults scope=col
- alert display area gets aria-live region
- app header becomes <header> landmark; bell button labeled
- icon wrapper decorative by default (aria-hidden), ariaLabel opt-in
- Input drops wrapping <label> (name pollution) and hides placeholder span
- password toggle back in tab order with aria-label/aria-pressed
- CheckBoxDiv exposes checkbox role + state
- accordion trigger renders native Radix button
- dialogs focus container on open instead of suppressing autofocus
- full-screen modal exposes dialog role/aria-modal/ariaLabel
- flow list card focusable with keyboard activation

Also wraps test focus calls in act() and mocks the icon loader so
the a11y suite runs without React warnings.

* fix: skip Puppeteer Chrome download in remaining Dockerfiles

frontend and base images still ran bare npm install; puppeteer (via
accessibility-checker, test-only) tried to fetch Chrome and broke the
Docker image build in CI.

* test: extend a11y unit test coverage (jest-axe)

Adds axe + semantics tests for untested primitives (button, alert,
textarea, radio-group, dropdown-menu, tooltip, popover) and two
known-gap tests that fail by design until fixes land:
- copyFieldAreaComponent copy action is a bare div onClick (plan 2.4)
- DialogContentWithouFixed renders an empty fragment (plan 1.6)

* fix: make webhook copy field a real button (a11y)

Copy action was a bare div onClick - no role, name, or keyboard
support (a11y-action-plan 2.4). Drops the no-longer-needed
DialogContentWithouFixed known-gap test.

* feat: update a11y unit tests and improve accessibility semantics in components

* feat: enable pull request trigger for a11y scan workflow

* test: add a11y regression scan suite

* test: make a11y scans non-blocking

* test: discover a11y scan specs

* ci: group a11y workflow checks
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

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: bd8528bc-31dd-4daf-afd2-26034e90d452

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

Walkthrough

The PR adds IBM Level 1 accessibility documentation and test guidance, and updates frontend accessibility for code-copy controls, alerts, and trace table/span interactions with locale strings and tests.

Changes

Accessibility baseline and remediation

Layer / File(s) Summary
Level 1 baseline docs
a11y-level-1-requirements.md, a11y-gap-report.md
Adds the Level 1 requirements reference and the gap report with audit metadata, criterion status tables, detailed findings, and a prioritized fix list.
Remediation plan
a11y-action-plan.md
Adds the phased accessibility action plan with checklist usage, task phases, verification steps, and exit criteria.
Test workflow and type imports
a11y-test-usage.md, src/frontend/tests/fixtures.ts, src/frontend/tests/a11y/auth-pages.a11y.spec.ts
Documents Playwright and jest-axe accessibility test usage and converts shared fixture and auth-page imports to type-only usage.
Copy-code labels and alert semantics
src/frontend/src/components/core/codeTabsComponent/index.tsx, src/frontend/src/components/ui/alert.tsx, src/frontend/src/locales/*.json
Adds chat copy-code translation keys, localizes the code-tabs copy button aria-label, and changes AlertTitle to render as a div.
Trace table keyboard and labels
src/frontend/src/pages/FlowPage/components/TraceComponent/FlowInsightsContent.tsx, src/frontend/src/pages/FlowPage/components/TraceComponent/SpanNode.tsx, src/frontend/src/pages/FlowPage/components/TraceComponent/__tests__/FlowInsightsContent.a11y.test.ts, src/frontend/src/locales/*.json
Adds trace table and span labels, Enter-key row activation, row tabindex management, localized span toggle labels, and tests for tabindex assignment.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • viktoravelino
  • deon-sanchez
  • Adam-Aghili

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
Test Coverage For New Implementations ❌ Error The added a11y test reimplements the helper instead of testing FlowInsightsContent, and the shared AlertTitle/codeTabs/SpanNode changes lack targeted regressions. Wire the test to production code (export/import the helper or render FlowInsightsContent) and add focused regressions for AlertTitle semantics, copy button labels, and SpanNode aria-labels.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Quality And Coverage ⚠️ Warning FAIL: the new a11y test copies applyRowTabIndices instead of exercising FlowInsightsContent, and no automated test covers the Enter-key, grouped-mode, or AlertTitle changes. Import/expose the production helper or render FlowInsightsContent/TableComponent directly, and add tests for Enter activation, grouped mode, and AlertTitle semantics.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the traces page accessibility fix and the rowgroup tabbable issue, which matches the main change set.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Test File Naming And Structure ✅ Passed Test files match repo conventions: Playwright .spec.ts tests in src/frontend/tests and component-level .test.ts in tests, with descriptive names and edge-case coverage.
Excessive Mock Usage Warning ✅ Passed The new trace a11y test uses real DOM elements and no jest.mock/spyOn stubs; the PR’s other changes are imports/semantics only, so there’s no excessive mocking here.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch LE-1611

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.

@github-actions github-actions Bot added the bug Something isn't working label Jun 18, 2026
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 44%
44.68% (60641/135711) 69.6% (8301/11926) 43% (1370/3186)

Unit Test Results

Tests Skipped Failures Errors Time
5146 0 💤 0 ❌ 0 🔥 17m 21s ⏱️

@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 18, 2026
@github-actions github-actions Bot added the bug Something isn't working label Jun 26, 2026
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 26, 2026
@github-actions github-actions Bot added the lgtm This PR has been approved by a maintainer label Jun 26, 2026
@erichare
erichare deleted the branch release-1.11.0 July 1, 2026 18:33
@erichare erichare closed this Jul 1, 2026
@erichare erichare reopened this Jul 1, 2026
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jul 2, 2026
@viktoravelino
viktoravelino added this pull request to the merge queue Jul 6, 2026
@viktoravelino
viktoravelino removed this pull request from the merge queue due to a manual request Jul 6, 2026
…omposition for Trace Detail panel (#13777)

* a11y: fix WCAG AA contrast and icon accessibility violations

* a11y: refactor Trace panel into focused hooks with ARIA tree and WCAG fixes

* [autofix.ci] apply automated fixes

* fix(a11y): fix stale span tree focus, replace data-testid DOM queries with ref map, and make code tab light theme explici

* [autofix.ci] apply automated fixes

* fix: reorder import statements for consistency

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Viktor Avelino <64113566+viktoravelino@users.noreply.github.com>
Co-authored-by: Viktor Avelino <viktor.avelino@gmail.com>
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jul 6, 2026
@viktoravelino
viktoravelino enabled auto-merge July 6, 2026 14:58
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jul 6, 2026
@viktoravelino
viktoravelino added this pull request to the merge queue Jul 6, 2026
Merged via the queue into release-1.11.0 with commit a91c3fd Jul 6, 2026
96 of 97 checks passed
@viktoravelino
viktoravelino deleted the LE-1611 branch July 6, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants