A11y: Fix fastpass issues for /explore with gdev-testdata (#40309)

* A11y: Fix fastpass issues for /explore with gdev-testdata

* Chore: changes after PR feedback

* Chore: revert file to main

* Tests: fix for e2e tests
This commit is contained in:
Hugo Häggmark
2021-10-13 06:09:35 +02:00
committed by GitHub
parent 2448123a65
commit 30c1e7fa5c
11 changed files with 21 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
import React, { useState, useCallback } from 'react';
import React, { useCallback, useState } from 'react';
import { Icon, renderOrCallToRender, stylesFactory, useTheme } from '@grafana/ui';
import { GrafanaTheme } from '@grafana/data';
import { css, cx } from '@emotion/css';
@@ -102,10 +102,11 @@ export const QueryOperationRow: React.FC<QueryOperationRowProps> = ({
return (
<Draggable draggableId={id} index={index}>
{(provided) => {
const dragHandleProps = { ...provided.dragHandleProps, role: 'group' }; // replace the role="button" because it causes https://dequeuniversity.com/rules/axe/4.3/nested-interactive?application=msftAI
return (
<>
<div ref={provided.innerRef} className={styles.wrapper} {...provided.draggableProps}>
<div {...provided.dragHandleProps}>{rowHeader}</div>
<div {...dragHandleProps}>{rowHeader}</div>
{isContentVisible && <div className={styles.content}>{children}</div>}
</div>
</>