Skip to content

Conversation

@sakari-malkki
Copy link
Member

Caption under table element was bound by the limits of the table causing issues

Copilot AI review requested due to automatic review settings November 5, 2025 14:31
Copy link
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

This PR refactors table titles from using semantic <caption> elements inside tables to separate <p> elements positioned before the table. This resolves layout constraints imposed by the table element on its caption.

Key Changes:

  • Replaced <caption class="tableChart-caption"> with <p class="tableChart-title"> positioned outside the table
  • Added aria-labelledby attribute to link tables to their title elements for accessibility
  • Updated CSS class name from tableChart-caption to tableChart-title

Reviewed Changes

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

File Description
src/core/tables/htmlTable.ts Refactored title rendering to create a <p> element outside the table instead of a <caption> element inside
src/react/components/globalStyle/globalStyle.ts Updated CSS class selector from tableChart-caption to tableChart-title
src/react/components/chart/snapshots/tableView.test.tsx.snap Updated test snapshots to reflect new title structure with <p> element and aria-labelledby
src/core/tables/snapshots/htmlTable.test.ts.snap Updated test snapshots to reflect new title structure with <p> element and aria-labelledby

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

Copilot AI review requested due to automatic review settings November 6, 2025 10:47
Copy link
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 6 out of 7 changed files in this pull request and generated 2 comments.


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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@sakari-malkki sakari-malkki merged commit fcaf93c into dev Nov 7, 2025
8 checks passed
@sakari-malkki sakari-malkki deleted the bugfix/fix-table-title branch November 7, 2025 11:06
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