[GH-ISSUE #6832] [Feature]: Improve screen reader (TalkBack) accessibility for dropdown menus (Protocol, Transport, etc.) #4548

Open
opened 2026-10-31 20:40:25 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @alinasrollahzadeh405-sudo on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6832

I'm always frustrated when using screen readers (like Android TalkBack) to interact with selection menus in the panel.

When opening dropdown menus or modals (such as switching Protocol, changing Network/Transport settings, or selecting other menu options), the screen reader fails to focus on the newly opened menu items. As a result, visually impaired users using TalkBack cannot navigate, read, or select these options.

Describe the solution you'd like

Implement standard accessibility focus management for dropdowns and popups (e.g., using ARIA attributes like aria-expanded, aria-controls, or properly directing focus to the active dropdown layer upon opening). This will allow TalkBack to immediately lock onto and read the selectable items.

Alternatives you've considered

No response

Concrete use case

No response

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

No response

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @alinasrollahzadeh405-sudo on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6832 ### Is your feature request related to a problem? I'm always frustrated when using screen readers (like Android TalkBack) to interact with selection menus in the panel. When opening dropdown menus or modals (such as switching Protocol, changing Network/Transport settings, or selecting other menu options), the screen reader fails to focus on the newly opened menu items. As a result, visually impaired users using TalkBack cannot navigate, read, or select these options. ### Describe the solution you'd like Implement standard accessibility focus management for dropdowns and popups (e.g., using ARIA attributes like `aria-expanded`, `aria-controls`, or properly directing focus to the active dropdown layer upon opening). This will allow TalkBack to immediately lock onto and read the selectable items. ### Alternatives you've considered _No response_ ### Concrete use case _No response_ ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? _No response_ ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [ ] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

@MHSanaei commented on GitHub (Oct 16, 2026):

@claude analyze

<!-- gh-comment-id:6212784331 --> @MHSanaei commented on GitHub (Oct 16, 2026): @claude analyze
Author
Owner

@github-actions[bot] commented on GitHub (Oct 16, 2026):

This is a real accessibility gap, but it is a feature request rather than a defect in 3x-ui's own code. The Protocol, Transport and other pickers are stock Ant Design Select components. The panel adds no custom dropdown markup on top of them, so any fix has to change how the panel uses Select or be made upstream in Ant Design. Adding aria-expanded/aria-controls, as the issue proposes, would not be enough by itself.

What the source shows:

  • The Protocol picker on the inbound form is a plain Select. In frontend/src/pages/inbounds/form/InboundFormModal.tsx:665-666:
    <FormField name="protocol" label={t('pages.inbounds.protocol')}>
      <Select id="protocol" disabled={mode === 'edit'} options={PROTOCOL_OPTIONS} />
    
    The outbound form does the same thing at frontend/src/pages/xray/outbounds/OutboundFormModal.tsx:404.
  • None of the pages' ConfigProvider wrappers changes Select behaviour. They pass only theme (for example frontend/src/pages/inbounds/InboundsPage.tsx:713). The only Select in the tree with an explicit virtual prop is in frontend/src/components/geodata/GeoBrowserModal.tsx:352. Every dropdown therefore uses Ant Design's defaults: antd 6.6.5, which uses @rc-component/select 1.10.1 and @rc-component/virtual-list 1.5.2 (frontend/package-lock.json:6434, :3691, :3917).
  • The panel's own tests locate the open options through the visual class .ant-select-item-option, not through an ARIA role (frontend/src/test/test-utils.tsx:41,59). That is consistent with the visible option rows not being the elements that carry role="option".
  • The frontend lint already runs the jsx-a11y rules (frontend/.oxlintrc.json:9). Those rules check the JSX the panel writes, not the DOM that Select generates at runtime, so they cannot catch this.

Why TalkBack behaves the way you describe (an inference: node_modules is not installed in this checkout, and I could not read the @rc-component/select source): as far as I know, rc-select keeps focus on its combobox input. It exposes the options to assistive technology through a separate, visually hidden role="listbox" that holds only the active option and its neighbours. The rows you see and swipe to are rendered in a virtualised list without option semantics. That matches both symptoms in your report and in your comment on #6107: focus does not move into the opened list, and swiping reaches entries like VLESS/VMess that are not announced as selectable.

Possible directions, for the maintainer to decide:

  1. Report it upstream to ant-design/ant-design / react-component/select with the TalkBack + Chrome reproduction, so every Select benefits.
  2. In the panel, render a native <select> instead of the Ant Design Select for short, fixed option lists (Protocol, Transport, Flow, language). Android's native picker works with TalkBack. This changes how those controls look, so it is a design decision. Setting virtual={false} would only stop the list being virtualised. I have not confirmed it adds option roles, so it may not be enough on its own.

Related: #6107 is the same request in broader form, and your reply there already describes these dropdowns. #5486 is the earlier labelling work. This issue is the more focused report of the dropdown part, so I left it open next to #6107 instead of closing it as a duplicate.

Not determined: whether virtual={false} alone makes the options selectable in TalkBack. That needs a test on a real Android device with TalkBack and Chrome.

Verdict: Feature request

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:6212815606 --> @github-actions[bot] commented on GitHub (Oct 16, 2026): This is a real accessibility gap, but it is a feature request rather than a defect in 3x-ui's own code. The Protocol, Transport and other pickers are stock Ant Design `Select` components. The panel adds no custom dropdown markup on top of them, so any fix has to change how the panel uses `Select` or be made upstream in Ant Design. Adding `aria-expanded`/`aria-controls`, as the issue proposes, would not be enough by itself. What the source shows: - The Protocol picker on the inbound form is a plain `Select`. In `frontend/src/pages/inbounds/form/InboundFormModal.tsx:665-666`: ```tsx <FormField name="protocol" label={t('pages.inbounds.protocol')}> <Select id="protocol" disabled={mode === 'edit'} options={PROTOCOL_OPTIONS} /> ``` The outbound form does the same thing at `frontend/src/pages/xray/outbounds/OutboundFormModal.tsx:404`. - None of the pages' `ConfigProvider` wrappers changes `Select` behaviour. They pass only `theme` (for example `frontend/src/pages/inbounds/InboundsPage.tsx:713`). The only `Select` in the tree with an explicit `virtual` prop is in `frontend/src/components/geodata/GeoBrowserModal.tsx:352`. Every dropdown therefore uses Ant Design's defaults: antd `6.6.5`, which uses `@rc-component/select` `1.10.1` and `@rc-component/virtual-list` `1.5.2` (`frontend/package-lock.json:6434`, `:3691`, `:3917`). - The panel's own tests locate the open options through the visual class `.ant-select-item-option`, not through an ARIA role (`frontend/src/test/test-utils.tsx:41,59`). That is consistent with the visible option rows not being the elements that carry `role="option"`. - The frontend lint already runs the `jsx-a11y` rules (`frontend/.oxlintrc.json:9`). Those rules check the JSX the panel writes, not the DOM that `Select` generates at runtime, so they cannot catch this. Why TalkBack behaves the way you describe (an inference: `node_modules` is not installed in this checkout, and I could not read the `@rc-component/select` source): as far as I know, rc-select keeps focus on its combobox input. It exposes the options to assistive technology through a separate, visually hidden `role="listbox"` that holds only the active option and its neighbours. The rows you see and swipe to are rendered in a virtualised list without option semantics. That matches both symptoms in your report and in your comment on #6107: focus does not move into the opened list, and swiping reaches entries like `VLESS`/`VMess` that are not announced as selectable. Possible directions, for the maintainer to decide: 1. Report it upstream to `ant-design/ant-design` / `react-component/select` with the TalkBack + Chrome reproduction, so every `Select` benefits. 2. In the panel, render a native `<select>` instead of the Ant Design `Select` for short, fixed option lists (Protocol, Transport, Flow, language). Android's native picker works with TalkBack. This changes how those controls look, so it is a design decision. Setting `virtual={false}` would only stop the list being virtualised. I have not confirmed it adds option roles, so it may not be enough on its own. Related: #6107 is the same request in broader form, and your reply there already describes these dropdowns. #5486 is the earlier labelling work. This issue is the more focused report of the dropdown part, so I left it open next to #6107 instead of closing it as a duplicate. Not determined: whether `virtual={false}` alone makes the options selectable in TalkBack. That needs a test on a real Android device with TalkBack and Chrome. Verdict: Feature request *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Author
Owner

@alinasrollahzadeh405-sudo commented on GitHub (Oct 24, 2026):

سلام خدمت شما آقای سنایی عزیز.

اگر براتون مقدوره، هرچه زودتر release جدید رو منتشر کنید و مشکل accessability رو حل کنید!

من نابینا هستم و حتی برای ساخت ایمباند هم مجبورم از یه فرد بینا کمک بگیرم! یعنی زمانی که یه فرد بینا کنارم نباشه، دستم عملا توی هر جایی که dropdown داره، بستست!

ممنون میشم سریعتر پیگیری کنید.

ممنون از تلاشهای شما!

<!-- gh-comment-id:6383769970 --> @alinasrollahzadeh405-sudo commented on GitHub (Oct 24, 2026): سلام خدمت شما آقای سنایی عزیز. اگر براتون مقدوره، هرچه زودتر release جدید رو منتشر کنید و مشکل accessability رو حل کنید! من نابینا هستم و حتی برای ساخت ایمباند هم مجبورم از یه فرد بینا کمک بگیرم! یعنی زمانی که یه فرد بینا کنارم نباشه، دستم عملا توی هر جایی که dropdown داره، بستست! ممنون میشم سریعتر پیگیری کنید. ممنون از تلاشهای شما!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4548
No description provided.