Browse Source

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

* fix: upgrade rc-table for a11y issue

* test: add test case for a11y
pull/39712/head
afc163 2 years ago
committed by GitHub
parent
commit
b5f27c8982
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      components/table/__tests__/Table.test.tsx
  2. 2
      package.json

7
components/table/__tests__/Table.test.tsx

@ -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
package.json

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

Loading…
Cancel
Save