mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6907] [MERGED] fix(frontend): make the panel usable with screen readers #6513
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6513
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6907
Author: @alireza0
Created: 10/23/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @alireza0
Base:
main← Head:fix/screen-reader-a11y📝 Commits (2)
9cfcf43fix(frontend): make the panel usable with screen readers8302ff4fix(frontend): keep mobile tab names and the inbound expiry hint📊 Changes
156 files changed (+2373 additions, -863 deletions)
View changed files
📝
frontend/.oxlintrc.json(+25 -2)📝
frontend/src/components/clients/ClientHwidList.tsx(+7 -2)📝
frontend/src/components/clients/ConfigBlock.tsx(+12 -3)📝
frontend/src/components/command-palette/CommandPalette.tsx(+39 -39)📝
frontend/src/components/feedback/TextModal.tsx(+2 -2)📝
frontend/src/components/form/DateTimePicker.tsx(+15 -2)📝
frontend/src/components/form/HeaderMapEditor.tsx(+4 -2)📝
frontend/src/components/form/RemarkTemplateField.tsx(+13 -1)📝
frontend/src/components/form/rhf/FormField.tsx(+14 -2)📝
frontend/src/components/geodata/GeoBrowserModal.tsx(+2 -0)📝
frontend/src/components/geodata/GeoTokenInput.tsx(+4 -1)📝
frontend/src/components/sponsor/SponsorCard.tsx(+3 -3)📝
frontend/src/components/ui/notifications/DiscordNotifications.tsx(+5 -5)📝
frontend/src/components/ui/notifications/EmailNotifications.tsx(+5 -5)📝
frontend/src/components/ui/notifications/TelegramNotifications.tsx(+5 -5)📝
frontend/src/entries/login.tsx(+8 -5)📝
frontend/src/entries/subpage.tsx(+8 -5)➕
frontend/src/i18n/AntdRootConfig.tsx(+41 -0)📝
frontend/src/i18n/react.ts(+4 -0)📝
frontend/src/layouts/AppSidebar.tsx(+43 -21)...and 80 more files
📄 Description
Summary
Screen-reader users (NVDA, TalkBack) reported that the panel is hard to use: forms, buttons and menus are not announced properly. This ports the fix from alireza0/s-ui-frontend@7574c9d (alireza0/s-ui#1293) and covers the gaps that are specific to Ant Design.
What a screen reader got before this PR:
<html lang="en">on every locale, so Persian/Arabic/Chinese pages were read with an English voice.Form.Item labelwithoutnameis not tied to its control.@ant-design/iconsicon rendersrole="img" aria-label="<icon-name>", so you heard "plus Add client" or "Total traffic question-circle".Changes
readyI18nsets<html lang>to the active locale (panel, login and subscription page).htmlFor+useIdids tie labels to controls. Controls with no visible label get a translatedaria-label.aria-hidden(554 sites). Status icons (node error, subscription status) are named with their tooltip text, and spinners read "Loading…".FormFieldexposestooltipasaria-describedby, and the directForm.Itemtooltip sites do the same.AntdRootConfig(rootConfigProvider) loads the antd locale for the panel language lazily and sets anaria-hiddenlabel-tooltip icon for all forms.DateTimePicker(both calendars),RemarkTemplateField,SecretInput,GeoTokenInputandTransformEditorforwardid/ aria props to their inputs.pages.index.logLines,pages.index.timeRange,pages.inbounds.form.maxVersion,pages.inbounds.form.headerName,pages.inbounds.form.headerValue).frontend/tools/oxlint/, enabled forsrc/**/*.tsx(stories and tests excluded):control-label/has-name: an antd form control with no accessible name, or aForm.Itemlabel not tied to its control.antd-icon/explicit-a11y: an antd icon with neitheraria-hiddennoraria-label.User-visible changes
?tooltip icon (inbound Total Flow / Expiry, TUN auto system routes / auto outbounds interface). The eight routing-rule fields and six inbound fields that already had a?icon now use antd's standard one.Testing
npm run lint,npm run typecheck,oxfmt --check,npm run build: clean.npm test: 1867 passed (198 files).document-lang,antd-locale,form-field-hint,rule-form-hintsdate-time-picker-label,node-list-a11y,overview-update-tag-keyboardcontrol-label-guard,icon-a11y-guard)make verifywas not run as a whole. No Go code changed; the Go side only gets the new translation keys.Not covered
ClientsPagehas no test harness.HeaderMapEditorrows are named per row ("Header name" / "Header value") but do not take theidfrom their parent label.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.