alireza0:x-ui 下一版本改造读屏与键盘操作

alireza0 在 x-ui #1399 中说明,下一版本将改造面板的读屏与键盘操作:组合框提供名称、展开状态及选项播报;装饰图标对读屏隐藏,可点击图标改为可用 Tab、Enter 或空格操作的具名按钮。表单标签与提示关联到字段,键盘打开菜单或确认框时转移焦点,Escape 关闭后返回原按钮;页面语言跟随面板语言。部分内置提示仍只有英文。作者仅检查了浏览器向辅助技术暴露的内容,尚未使用 NVDA 实测,邀请用户在发布后反馈。

作者原文

Thanks for the detailed report. The next release reworks the panel for screen readers and keyboard use. Going through your points:

4. Comboboxes. We kept the existing select component, but the element that takes focus is now a proper combobox. It has a name (the field's label), states whether it is expanded, and announces the option you reach with the arrow keys. Down Arrow opens the list, the arrows move through it, and Enter picks an option. The language select on the login page and in settings works the same way.

5. "icon: something". Decorative icons are now hidden from screen readers, so menu items and buttons are read by their text only.

6. Icons without text. Every clickable icon is now a real button. You can reach it with Tab, use it with Enter or Space, and it has a translated name, such as "Delete", "Add", "Edit Client", "QR Code", "Reset Traffic", "More actions" or "Show password". Where the name comes from the icon alone, the field or section it belongs to is added, for example "Add TCP Masks", "Delete Fallback 1" or "Generate new Email". Buttons that showed only "+" or "-" are now "Add" and "Remove".

Other changes:

  • The page language is set to the panel language, so NVDA reads Persian, Chinese, Russian and Vietnamese with the right voice.
  • Form fields and setting rows are named after their labels. The hint text, previously only shown when hovering the "?" icon, is attached as the field's description.
  • Dropdown menus and confirmations opened from the keyboard move focus into the menu or the confirm buttons. Escape closes them, and focus returns to the button that opened them.
  • The clickable tags on the overview (Stop, Restart, Logs, Config, Backup) and the enable switches in the tables, which include the inbound or client name, are reachable by keyboard and named.
  • The JSON editors are named "JSON".

Known gaps: some built-in strings such as "Increase Value" and "Select date" are still in English for every language.

I tested this in the browser by checking what the page exposes to screen readers, not with NVDA itself. Once the release is out, could you try it with NVDA and tell us what still gets in the way? Feedback from real use is what will show the remaining problems.