Skip to content

Commit

Permalink
fix: upgrade rc-table for a11y issue (#39700)
Browse files Browse the repository at this point in the history
* fix: upgrade rc-table for a11y issue

* test: add test case for a11y
  • Loading branch information
afc163 committed Dec 21, 2022
1 parent 2fc3cee commit b5f27c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions components/table/__tests__/Table.test.tsx
Expand Up @@ -353,4 +353,11 @@ describe('Table', () => {

expect(container.querySelector('thead th')).toMatchSnapshot();
});

// https://github.com/react-component/table/pull/855
it('support aria-* and data-*', async () => {
const { container } = render(<Table aria-label="label" data-number="123" />);
expect(container.querySelector('table')?.getAttribute('aria-label')).toBe('label');
expect(container.querySelector('.ant-table')?.getAttribute('data-number')).toBe('123');
});
});
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -144,7 +144,7 @@
"rc-slider": "~10.0.0",
"rc-steps": "~6.0.0-alpha.2",
"rc-switch": "~4.0.0",
"rc-table": "~7.28.2",
"rc-table": "~7.28.3",
"rc-tabs": "~12.5.1",
"rc-textarea": "~0.4.5",
"rc-tooltip": "~5.2.0",
Expand Down

0 comments on commit b5f27c8

Please sign in to comment.