From fa3c4121460ebf4ca4412a38b29a7f3f07075c9b Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Mon, 3 Feb 2025 10:14:48 +0800 Subject: [PATCH] refactor: add missing aria-labels for accessibility compliance --- src/renderer/src/components/settings/general-config.tsx | 2 ++ src/renderer/src/components/settings/mihomo-config.tsx | 1 + 2 files changed, 3 insertions(+) diff --git a/src/renderer/src/components/settings/general-config.tsx b/src/renderer/src/components/settings/general-config.tsx index 8c3288c..6069552 100644 --- a/src/renderer/src/components/settings/general-config.tsx +++ b/src/renderer/src/components/settings/general-config.tsx @@ -170,6 +170,7 @@ const GeneralConfig: React.FC = () => { size="sm" selectionMode="multiple" selectedKeys={new Set(envType)} + aria-label="选择环境变量类型" onSelectionChange={async (v) => { try { await patchAppConfig({ @@ -363,6 +364,7 @@ const GeneralConfig: React.FC = () => { className="w-[60%]" size="sm" selectedKeys={new Set([customTheme])} + aria-label="选择主题" onSelectionChange={async (v) => { try { await patchAppConfig({ customTheme: v.currentKey as string }) diff --git a/src/renderer/src/components/settings/mihomo-config.tsx b/src/renderer/src/components/settings/mihomo-config.tsx index fd2df2b..0d0d332 100644 --- a/src/renderer/src/components/settings/mihomo-config.tsx +++ b/src/renderer/src/components/settings/mihomo-config.tsx @@ -126,6 +126,7 @@ const MihomoConfig: React.FC = () => { className="w-[150px]" size="sm" selectedKeys={new Set([proxyCols])} + aria-label="选择代理节点展示列数" onSelectionChange={async (v) => { await patchAppConfig({ proxyCols: v.currentKey as 'auto' | '1' | '2' | '3' | '4' }) }}