question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Carbon 10: Data Table] Table heading in table body

See original GitHub issue

Detailed description

Describe in detail the issue you’re having.

<th> should be used within the table body to denote the row’s heading but it’s styling is odd.

Is this issue related to a specific component?

Data Table

What did you expect to happen? What happened instead? What would you like to see changed?

Table row heading should align with the rest of the cells. Often they don’t visually look different from other cells but are semantically important for screen reader users

What browser are you working in?

Chrome, FireFox, Safari

What version of the Carbon Design System are you using?

v10.0.0

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

Watson Health Pattern & Asset Library (PAL)

Steps to reproduce the issue

  1. Add a th as a cell within the tbody
  2. View the table styles

Screenshot

Screen Shot 2019-04-09 at 2 27 46 PM

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
elizabethsjuddcommented, Apr 26, 2019

@designertyler The request is to not have the headers in the table body look like the column styles and instead look like a standard tbody cell. If that bug was taken care, I would say this issue is fixed. The table in the screen shot should look like the tables on the Carbon website.

With that said, I don’t think it’s a bad practice to have the option to have a “row header” style but that does require additional work (design specs) and could be done as part of a separate issue IMO

1reaction
jnm2377commented, Apr 26, 2019

Right, but the th in tbody would still need to receive “default row cell” styles, so if we want both options, as in have the th look like all the other cells or look like a header, we’d have 2 selectors. Targeting the th would be used to apply the default styles, and the th with the special class would apply an optional “row header” look. @elizabethsjudd

Read more comments on GitHub >

github_iconTop Results From Across the Web

Data table – Carbon Design System
The data table's features are ideal for organizing and displaying data in a UI. The column headers can sort data in ascending or...
Read more >
Data table
The basic table style is the required base from which tables can be developed. Basic tables are composed of a header row followed...
Read more >
DataTable - Carbon Components Svelte - Render
Some use cases require an empty column in the table body without a corresponding table header. For an object in the headers array,...
Read more >
Table is broken when using stickyHeader true (Angular + ...
I was able to solve this issue by passing specific widths in table header. I'm passing them in % mode and I'm also...
Read more >
All cells in a <table> element that use the headers attribute ...
To fix the problem, ensure that each cell in a table using headers refers to another cell in the same table by creating...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found