aria-invalid is not supported on handles
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 90/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi xem Slider chuyển tiếp các thuộc tính hỗ trợ truy cập đến các nút trượt như thế nào, đặc biệt là cách xử lý ariaRequired hiện có và ariaDescribedByForHandle dành riêng cho nút trượt. Thêm thuộc tính booleanh ariaInvalid để hiển thị aria-invalid trên từng nút trượt. Hoàn tất nghĩa là thuộc tính này đã đến với mọi nút trượt và kiểu, hành vi cũng như khả năng kiểm thử hỗ trợ truy cập mong đợi đều đã được xác minh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A handle (role="slider") can be given aria-label, aria-labelledby, aria-describedby (#1088), aria-required and aria-valuetext, but not aria-invalid. WAI-ARIA 1.2 supports aria-invalid on the slider role, and it is how a screen reader learns that a field's value failed validation. Without it, a form can show a slider's error only visually.
Slider drops the aria-* props it is given, and the handle takes nothing beyond its own props, so the only way to set it is to change the DOM after render, the workaround #1040 described for aria-describedby.
antd shows the gap. Form.Item passes aria-invalid, aria-describedby and aria-required to its child control. An Input gets all three, but Slider drops them (antd 6.6.6, @rc-component/slider 1.1.1):
<Form fields={[{ name: ['name'], errors: ['Too short'] }, { name: ['volume'], errors: ['Too quiet'] }]}>
<Form.Item name="name" label="Name" required extra="Your name">
<Input />
</Form.Item>
<Form.Item name="volume" label="Volume" required extra="How loud">
<Slider />
</Form.Item>
</Form>
renders, with class and style left out:
<input id="name" aria-describedby="name_help name_extra" aria-required="true" type="text" value="" aria-invalid="true">
<div tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-disabled="false"
aria-orientation="horizontal"></div>
Could the slider take an ariaInvalid?: boolean prop alongside ariaRequired, rendered as aria-invalid on each handle? antd could then pass it through as it did ariaDescribedByForHandle (ant-design/ant-design#59110), and its Slider could give the handle the aria-invalid, aria-describedby and aria-required that Form.Item hands it.
We hit this in react-jsonschema-form's antd theme, which can't mark its slider invalid: rjsf-team/react-jsonschema-form#5560.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.1k
- Fork
- 766
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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/slider
-
Docs site is brokenĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
react-component/slider#1067 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
react-component/slider#1064 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
react-component/slider#1061 ·
-
当Slider宽度超过外层容器时,点击Slider,滚动条位置异常Có thể đã có người làm @nrps9909 đã nhận 51 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
react-component/slider#1060 ·
-
Breaking changes for v11?Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 42/100
react-component/slider#1058 · 1 bình luận ·
Tất cả issue của react-component/slider
Issue tương tự
-
bug priority: P2
Độ 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
-
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
mattermost/compass-design#106 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
openclaw/openclaw#176671 · 1 bình luận · 1 reaction ·
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 66/100
nordcraftengine/nordcraft#1400 ·
Maintainer thường phản hồi trong vòng 1 ngày