mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 02:23:31 -06:00
a11y: Fix no-static-element-interactions in xy chart editor (#76170)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
This commit is contained in:
parent
677f7c38e8
commit
cfa7311fd4
@ -66,9 +66,19 @@ export const ManualEditor = ({
|
||||
<div className={style.marginBot}>
|
||||
{value.map((series, index) => {
|
||||
return (
|
||||
// TODO: fix keyboard a11y
|
||||
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
||||
<div key={`series/${index}`} className={getRowStyle(index)} onMouseDown={() => setSelected(index)}>
|
||||
<div
|
||||
key={`series/${index}`}
|
||||
className={getRowStyle(index)}
|
||||
onClick={() => setSelected(index)}
|
||||
role="button"
|
||||
aria-label={`Select series ${index + 1}`}
|
||||
tabIndex={0}
|
||||
onKeyPress={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
setSelected(index);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<LayerName
|
||||
name={series.name ?? `Series ${index + 1}`}
|
||||
onChange={(v) => onFieldChange(v, index, 'name')}
|
||||
|
Loading…
Reference in New Issue
Block a user