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