[Carbon 10: Data Table] Table heading in table body
See original GitHub issueDetailed 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
- Add a
th
as a cell within thetbody
- View the table styles
Screenshot
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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
Right, but the
th
intbody
would still need to receive “default row cell” styles, so if we want both options, as in have theth
look like all the other cells or look like a header, we’d have 2 selectors. Targeting theth
would be used to apply the default styles, and theth
with the special class would apply an optional “row header” look. @elizabethsjudd