From 45a76fa90bc95e6213a7dc42805969d5ab8a3cb9 Mon Sep 17 00:00:00 2001 From: yyh Date: Wed, 21 Jan 2026 15:13:50 +0800 Subject: [PATCH] fix: improve accessibility for file-tree components - Convert clickable div to semantic button in artifacts-section - Add aria-hidden to decorative icons - Add aria-label to rename inputs and hidden file inputs - Add i18n keys for artifacts section and rename labels - Support ignore file extensions (.gitignore, etc.) --- .../skill/file-tree/artifacts-section.tsx | 20 ++++++++++++++----- .../workflow/skill/file-tree/index.tsx | 4 ++-- .../workflow/skill/file-tree/node-menu.tsx | 2 ++ .../skill/file-tree/tree-edit-input.tsx | 5 +++++ web/i18n/en-US/workflow.json | 4 ++++ web/i18n/zh-Hans/workflow.json | 6 +++++- 6 files changed, 33 insertions(+), 8 deletions(-) diff --git a/web/app/components/workflow/skill/file-tree/artifacts-section.tsx b/web/app/components/workflow/skill/file-tree/artifacts-section.tsx index 90c4d427fd..faf4c2f692 100644 --- a/web/app/components/workflow/skill/file-tree/artifacts-section.tsx +++ b/web/app/components/workflow/skill/file-tree/artifacts-section.tsx @@ -3,6 +3,7 @@ import type { FC } from 'react' import { RiArrowRightSLine } from '@remixicon/react' import * as React from 'react' +import { useTranslation } from 'react-i18next' import FolderSpark from '@/app/components/base/icons/src/vender/workflow/FolderSpark' import { cn } from '@/utils/classnames' @@ -17,22 +18,31 @@ type ArtifactsSectionProps = { * Placeholder implementation - functionality to be added later. */ const ArtifactsSection: FC = ({ className }) => { + const { t } = useTranslation('workflow') // TODO: Replace with actual data const badgeText = 'Test Run#3' const hasNewFiles = true return (
-
+
) } diff --git a/web/app/components/workflow/skill/file-tree/index.tsx b/web/app/components/workflow/skill/file-tree/index.tsx index bae0ecdf18..e719251523 100644 --- a/web/app/components/workflow/skill/file-tree/index.tsx +++ b/web/app/components/workflow/skill/file-tree/index.tsx @@ -40,7 +40,7 @@ const DropTip = () => { const { t } = useTranslation('workflow') return (
- +