mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
A11y: enable rule jsx-a11y/aria-role (#55760)
This commit is contained in:
parent
2bfd26249b
commit
4544494058
@ -47,7 +47,7 @@
|
||||
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
||||
"jsx-a11y/aria-props": "error",
|
||||
"jsx-a11y/aria-proptypes": "error",
|
||||
"jsx-a11y/aria-role": "off",
|
||||
"jsx-a11y/aria-role": "error",
|
||||
"jsx-a11y/aria-unsupported-elements": "error",
|
||||
"jsx-a11y/autocomplete-valid": "error",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
|
@ -27,12 +27,11 @@ export const Filter: FC<Props> = ({ column, field, tableStyles }) => {
|
||||
if (!field || !field.config.custom?.filterable) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<span
|
||||
className={cx(tableStyles.headerFilter, filterEnabled ? styles.filterIconEnabled : styles.filterIconDisabled)}
|
||||
ref={ref}
|
||||
role="filterIcon"
|
||||
role="button"
|
||||
onClick={onShowPopover}
|
||||
>
|
||||
<Icon name="filter" />
|
||||
|
@ -200,7 +200,7 @@ describe('Table', () => {
|
||||
|
||||
expect(within(getTable()).getAllByRole('row')).toHaveLength(9);
|
||||
|
||||
await userEvent.click(within(getColumnHeader(/number/)).getByRole('filterIcon'));
|
||||
await userEvent.click(within(getColumnHeader(/number/)).getByRole('button', { name: '' }));
|
||||
await userEvent.click(screen.getByLabelText('1'));
|
||||
await userEvent.click(screen.getByText('Ok'));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user