A11y: Fix keyboard accessibility in LayerDragDropList (#71386)

fix(a11y): drag and drop layer list
This commit is contained in:
Ihor Yeromin 2023-07-12 14:14:12 +02:00 committed by GitHub
parent fdb8257007
commit d9057c010c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,14 +61,14 @@ export const LayerDragDropList = <T extends LayerElement>({
rows.push( rows.push(
<Draggable key={uid} draggableId={uid} index={rows.length}> <Draggable key={uid} draggableId={uid} index={rows.length}>
{(provided, snapshot) => ( {(provided, snapshot) => (
// TODO: fix keyboard a11y
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
<div <div
className={getRowStyle(isSelected)} className={getRowStyle(isSelected)}
ref={provided.innerRef} ref={provided.innerRef}
{...provided.draggableProps} {...provided.draggableProps}
{...provided.dragHandleProps} {...provided.dragHandleProps}
onMouseDown={() => onSelect(element)} onMouseDown={() => onSelect(element)}
role="button"
tabIndex={0}
> >
<LayerName <LayerName
name={uid} name={uid}