From 984045190c869d118d3e4ce9f9a88bf43a67d49e Mon Sep 17 00:00:00 2001 From: yyh <92089059+lyzno1@users.noreply.github.com> Date: Mon, 3 Aug 2026 21:41:15 +0800 Subject: [PATCH] fix(web): improve home accessibility (#39938) --- oxlint-suppressions.json | 5 -- .../explore/app-list/__tests__/index.spec.tsx | 3 +- .../app-list/explore-app-list-header.tsx | 2 +- .../continue-work/__tests__/item.spec.tsx | 56 ++++++++++----- .../explore/continue-work/index.tsx | 2 +- .../components/explore/continue-work/item.tsx | 71 +++++++++++++------ .../learn-dify/__tests__/item.spec.tsx | 23 ++++-- .../components/explore/learn-dify/index.tsx | 2 +- .../components/explore/learn-dify/item.tsx | 32 +++++---- 9 files changed, 124 insertions(+), 72 deletions(-) diff --git a/oxlint-suppressions.json b/oxlint-suppressions.json index 1dc6879617d..62bf07bc0bb 100644 --- a/oxlint-suppressions.json +++ b/oxlint-suppressions.json @@ -2840,11 +2840,6 @@ "count": 1 } }, - "web/app/components/explore/learn-dify/item.tsx": { - "jsx_a11y/no-noninteractive-element-interactions": { - "count": 1 - } - }, "web/app/components/explore/try-app/app/text-generation.tsx": { "jsx_a11y/click-events-have-key-events": { "count": 1 diff --git a/web/app/components/explore/app-list/__tests__/index.spec.tsx b/web/app/components/explore/app-list/__tests__/index.spec.tsx index 8b61e29cfbc..f33cb348056 100644 --- a/web/app/components/explore/app-list/__tests__/index.spec.tsx +++ b/web/app/components/explore/app-list/__tests__/index.spec.tsx @@ -803,8 +803,7 @@ describe('AppList', () => { renderAppList() - const card = screen.getByRole('button', { name: 'Preview Only App' }) - expect(card).toHaveClass('opacity-60') + const card = screen.getByRole('button', { name: /Preview Only App.*app\.types\.chatbot/ }) expect(card).toHaveAttribute('aria-disabled', 'true') expect(screen.queryByRole('link', { name: /Preview Only App/ })).not.toBeInTheDocument() expect(screen.getByText('Readonly Author')).toBeInTheDocument() diff --git a/web/app/components/explore/app-list/explore-app-list-header.tsx b/web/app/components/explore/app-list/explore-app-list-header.tsx index 424089b26da..4f86c1bdad5 100644 --- a/web/app/components/explore/app-list/explore-app-list-header.tsx +++ b/web/app/components/explore/app-list/explore-app-list-header.tsx @@ -31,7 +31,7 @@ export function ExploreAppListHeader({ href="https://marketplace.dify.ai/templates" target="_blank" rel="noopener noreferrer" - className="flex shrink-0 items-center gap-1 system-xs-medium text-text-tertiary hover:text-text-secondary" + className="-m-1 flex min-h-6 shrink-0 touch-manipulation items-center gap-1 rounded-md p-1 system-xs-medium text-text-tertiary outline-hidden transition-colors hover:text-text-secondary focus-visible:ring-2 focus-visible:ring-state-accent-solid motion-reduce:transition-none" > {t(($) => $['apps.viewMore'], { ns: 'explore' })}