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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
1 deletions
-
components/table/__tests__/Table.test.tsx
-
package.json
|
|
@ -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'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
@ -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", |
|
|
|