-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Summary
Table is a custom semantic HTML table wrapper using CVA + CSS Modules. Missing displayName on all sub-components, accessibility attributes, and API completeness.
Improvements
1. Add displayName to all sub-components
None of TableRoot, TableHeader, TableBody, TableRow, TableHead, TableCell, or SectionHeader have displayName set. All other compound components in the library have this.
2. Add scope attribute support to TableHead (WCAG 2.1)
<th> elements should support scope="col" or scope="row" to programmatically associate headers with data cells.
3. Add <caption> element support
No Caption sub-component exposed for screen reader context, despite CSS having caption-side: bottom.
4. Add aria-sort support for sortable columns
Headers can't indicate sort direction, needed for sortable table patterns.
5. Replace hardcoded CSS values
border-bottom: 0.5px— sub-pixel rendering issue- Sticky header
top: 0px— should betop: 0
6. Normalize type signatures across sub-components
TableHead and TableCell use CVA variants but TableBody and TableRow don't. Inconsistent API surface.
7. Handle text truncation accessibility
Cells use text-overflow: ellipsis which hides content with no tooltip or accessible overflow mechanism.
Files
packages/raystack/raystack/components/table/