fix: upgrade rc-table for a11y issue (#39700)

* fix: upgrade rc-table for a11y issue

* test: add test case for a11y
This commit is contained in:
afc163 2022-12-21 14:01:05 +08:00 committed by GitHub
parent 2fc3ceeaaa
commit b5f27c8982
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -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');
});
});

View File

@ -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",