mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Accessibility: Enable rule jsx-a11y/no-noninteractive-element-interactions (#58077)
* fixes for no-noninteractive-element-interactions * remaining fixes * add type="button" * fix unit tests
This commit is contained in:
@@ -265,7 +265,7 @@ class LegendTable extends PureComponent<Partial<LegendComponentProps>> {
|
||||
}
|
||||
|
||||
return (
|
||||
<table>
|
||||
<table role="grid">
|
||||
<colgroup>
|
||||
<col style={{ width: '100%' }} />
|
||||
</colgroup>
|
||||
|
||||
@@ -107,7 +107,7 @@ export class LegendItem extends PureComponent<LegendItemProps, LegendItemState>
|
||||
if (asTable) {
|
||||
return (
|
||||
<tr className={`graph-legend-series ${seriesOptionClasses}`}>
|
||||
<td>
|
||||
<td role="gridcell">
|
||||
<div className="graph-legend-series__table-name">{seriesLabel}</div>
|
||||
</td>
|
||||
{valueItems}
|
||||
@@ -221,7 +221,7 @@ interface LegendValueProps {
|
||||
function LegendValue({ value, valueName, asTable, onValueClick }: LegendValueProps) {
|
||||
if (asTable) {
|
||||
return (
|
||||
<td className={`graph-legend-value ${valueName}`} onClick={onValueClick}>
|
||||
<td role="gridcell" className={`graph-legend-value ${valueName}`} onClick={onValueClick}>
|
||||
{value}
|
||||
</td>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user