Accessibility: Remove unnecessary onClick from title element (#59696)

* remove unnecessary onClick from title element

* associate icon label with title + fix unit tests

* remove cursor: pointer;

* remove link color from title as it's no longer clickable

* remove useless aria-label

* stop incorrectly marking title as a ReactNode - it's just a string
This commit is contained in:
Ashley Harrison
2023-01-30 13:32:16 +00:00
committed by GitHub
parent 8593ca245a
commit f19b07c0bc
4 changed files with 15 additions and 13 deletions
@@ -50,14 +50,14 @@ describe('InspectDataTab', () => {
});
it('should show available options', async () => {
render(<InspectDataTab {...createProps()} />);
const dataOptions = screen.getByText(/Data options/i);
const dataOptions = screen.getByRole('button', { name: /Data options/i });
await userEvent.click(dataOptions);
expect(screen.getByText(/Show data frame/i)).toBeInTheDocument();
expect(screen.getByText(/Download for Excel/i)).toBeInTheDocument();
});
it('should show available dataFrame options', async () => {
render(<InspectDataTab {...createProps()} />);
const dataOptions = screen.getByText(/Data options/i);
const dataOptions = screen.getByRole('button', { name: /Data options/i });
await userEvent.click(dataOptions);
const dataFrameInput = screen.getByRole('combobox', { name: /Select dataframe/i });
await userEvent.click(dataFrameInput);