diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ee467e5..59d88d77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Precise UI Changelog +## 2.1.10 + +- Fix WCAG error: Empty table header + ## 2.1.9 - Fixed `arrowToggle` on `AccordionTable` diff --git a/package.json b/package.json index e2f00bb3..ba0185c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "precise-ui", - "version": "2.1.9", + "version": "2.1.10", "description": "Precise UI React component library powered by Styled Components.", "keywords": [ "react", diff --git a/src/components/Table/TableBasic.part.tsx b/src/components/Table/TableBasic.part.tsx index 2947f167..ea73571f 100644 --- a/src/components/Table/TableBasic.part.tsx +++ b/src/components/Table/TableBasic.part.tsx @@ -42,6 +42,7 @@ const StyledTable = styled.table( border: ${borderless ? 'none' : theme.tableBorder}; > thead > tr > th, + > thead > tr > td, > tbody > tr > td { padding: ${condensed ? `${distance.small} ${distance.large}` : theme.tableHeadPadding}; @@ -245,8 +246,11 @@ export class TableBasic extends React.Component & RefProps, Tab const width = typeof column === 'string' ? undefined : column.width; const sortable = this.isSortable(key, columns); const direction = sortable && sortBy && (sortBy.columnKey !== key ? undefined : sortBy.order); + const headTag = `${name}`.trim() ? 'th' : 'td'; + return (