From 41ebfa098f0e22aa3298e5124450c1b0b645f1ce Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 16 Jun 2025 09:09:52 -0500 Subject: [PATCH] chore: aria support --- src/components/Explorer/FileExplorer.tsx | 19 ++++++++++++++++--- src/components/Explorer/ProjectExplorer.tsx | 19 +++++++++++-------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/components/Explorer/FileExplorer.tsx b/src/components/Explorer/FileExplorer.tsx index a409d0f53..90e050e3f 100644 --- a/src/components/Explorer/FileExplorer.tsx +++ b/src/components/Explorer/FileExplorer.tsx @@ -256,13 +256,14 @@ export const FileExplorer = ({ // Local state for selection and what is opened // diff this against new Project value that comes in return ( -
+
{rowsToRender .filter((row) => { return row.isOpen }) - .map((row, index) => { + .map((row, index, original) => { row.domIndex = index + row.domLength = original.length return ( { + const isSelected =row.name === selectedRow?.name && row.parentPath === selectedRow?.parentPath return (
{ row.rowClicked(row.domIndex) }} diff --git a/src/components/Explorer/ProjectExplorer.tsx b/src/components/Explorer/ProjectExplorer.tsx index 6e5f7643e..884a7d95b 100644 --- a/src/components/Explorer/ProjectExplorer.tsx +++ b/src/components/Explorer/ProjectExplorer.tsx @@ -93,17 +93,20 @@ export const ProjectExplorer = ({ >
-
{ - if (event.target === fileExplorerContainer.current) { - setActiveIndex(-1) - setSelectedRow(null) +
{ + if (event.target === fileExplorerContainer.current) { + setActiveIndex(-1) + setSelectedRow(null) } }} > - {activeIndex} + {activeIndex} {project && (