mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
fix: add aria-label to components to resolve accessibility warnings
This commit is contained in:
parent
35c239e02d
commit
7c8661ec0b
@ -303,6 +303,7 @@ const ProfileItem: React.FC<Props> = (props) => {
|
||||
{extra && (
|
||||
<Progress
|
||||
className="w-full"
|
||||
aria-label="流量使用进度"
|
||||
classNames={{
|
||||
indicator: isCurrent ? 'bg-primary-foreground' : 'bg-foreground'
|
||||
}}
|
||||
|
||||
@ -204,6 +204,7 @@ const ProfileCard: React.FC<Props> = (props) => {
|
||||
{extra && (
|
||||
<Progress
|
||||
className="w-full"
|
||||
aria-label="流量使用进度"
|
||||
classNames={{ indicator: match ? 'bg-primary-foreground' : 'bg-foreground' }}
|
||||
value={calcPercent(extra?.upload, extra?.download, extra?.total)}
|
||||
/>
|
||||
|
||||
@ -232,6 +232,7 @@ const Connections: React.FC = () => {
|
||||
classNames={{ trigger: 'data-[hover=true]:bg-default-200' }}
|
||||
size="sm"
|
||||
className="w-[180px] min-w-[120px]"
|
||||
aria-label="连接排序方式"
|
||||
selectedKeys={new Set([connectionOrderBy])}
|
||||
onSelectionChange={async (v) => {
|
||||
await patchAppConfig({
|
||||
|
||||
@ -114,6 +114,7 @@ const Mihomo: React.FC = () => {
|
||||
classNames={{ trigger: 'data-[hover=true]:bg-default-200' }}
|
||||
className="w-[100px]"
|
||||
size="sm"
|
||||
aria-label="选择内核版本"
|
||||
selectedKeys={new Set([core])}
|
||||
onSelectionChange={async (v) => {
|
||||
try {
|
||||
@ -650,6 +651,7 @@ const Mihomo: React.FC = () => {
|
||||
classNames={{ trigger: 'data-[hover=true]:bg-default-200' }}
|
||||
className="w-[100px]"
|
||||
size="sm"
|
||||
aria-label="选择日志等级"
|
||||
selectedKeys={new Set([logLevel])}
|
||||
onSelectionChange={(v) => {
|
||||
onChangeNeedRestart({ 'log-level': v.currentKey as LogLevel })
|
||||
@ -667,6 +669,7 @@ const Mihomo: React.FC = () => {
|
||||
classNames={{ trigger: 'data-[hover=true]:bg-default-200' }}
|
||||
className="w-[100px]"
|
||||
size="sm"
|
||||
aria-label="选择进程查找模式"
|
||||
selectedKeys={new Set([findProcessMode])}
|
||||
onSelectionChange={(v) => {
|
||||
onChangeNeedRestart({ 'find-process-mode': v.currentKey as FindProcessMode })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user