Bug: Options length is announced incorrectly by screen readers
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Bắt đầu bằng cách đọc OptionList.tsx quanh các dòng 274-276, nơi listbox render tùy chọn hiện tại và các tùy chọn liền kề. So sánh hành vi đó với cách render toàn bộ danh sách được đề xuất trong PR 805. Hoàn thành khi trình đọc màn hình thông báo đúng vị trí của từng tùy chọn và độ dài của toàn bộ danh sách tùy chọn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When navigating the select component with keyboard + screen reader (i am using Screen Reader extension in Chrome, but issue is similar with all screen readers), the current options is always announced as "[options label], not selected, 2 of 3". This gives the erroneous impression that there are only 3 options in the dropdown, when there might be many more, and is confusing to the user. Instead, the correct position and full length of options list should be announced (e.g. when focus is in options 3 of a list of 8 options, it should be announced as "[option label], not selected, 3 of 8")
How to Reproduce Bug
Open a page where the Select component is present. Have a screen reader on and navigate to Select component by pressing tab. Open dropdown. Depending on the screen reader you're using the announcement might differ a little, but in general it announces a list of 2 or 3 items.
Technical description of the issue
The problem can be seen in OptionList.tsx, line 274-276. I don't know for what reason it is implemented like this, but the [role="listbox"] element should contain all options, and not just the current item and the adjacent ones.
Proposed solution
Render all the options inside the listbox element. This way the length of the list and position of the element will be announced correctly.
I've already created a PR for this, where the rendering is optional by passing the prop renderFullOptionList={true} to the Select component, but I don't see a good reason why this wouldn't be the default and only way it renders
Open for suggestions or ways to achieve the desired result in other ways.
Thanks!
- Ngôn ngữ chính
- TypeScript
- Star
- 939
- Fork
- 480
- Merge trung bình
- 15 giờ 8 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của react-component/select
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
react-component/select#1216 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
react-component/select#1159 ·
-
a11y 问题Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
react-component/select#1087 · 1 reaction ·
-
showSearch 默认值是 false 把Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
react-component/select#1086 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
react-component/select#1082 · 1 bình luận ·
Tất cả issue của react-component/select
Issue tương tự
-
enhancement providers-api ui-dashboard
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
external-issue to-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
homarr-labs/homarr#6976 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày