Example app: icon-only IconButtons on the Icon Button screen have no accessible name

Đang mở Phù hợp với người mới
#5,182 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
86/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react-native, typescript
Lĩnh vực
accessibility, frontend

Hướng nghiên cứu

Mở example/src/Examples/IconButtonExample.tsx và kiểm tra từng IconButton chỉ có biểu tượng. Thêm aria-label mô tả thao tác của nút, sau đó chạy ứng dụng ví dụ trên web và kiểm tra /icon-button bằng axe-core. Hoàn tất khi axe không báo lỗi button-name nào trên màn hình đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Accessibility example app good first task
Current behaviour

On the example app's Icon Button screen (example/src/Examples/IconButtonExample.tsx), no IconButton passes an aria-label, so the icon-only ones render as buttons with no text, and a screen reader announces them only as "button". On the web axe-core reports button-name (critical): "Buttons must have discernible text".

Expected behaviour

Every icon-only IconButton in the example has an aria-label that says what it does, and axe reports no button-name violation on the screen.

How to reproduce?
  1. Run the example app on the web from main (yarn install, then npx expo start --web in example/).
  2. Open the Icon Button example (/icon-button).
  3. Run axe-core on the page.
Preview
What have you tried so far?
Your Environment
software version
react-native-paper main (8cb344b)
browser Chromium 153
Ngôn ngữ chính
TypeScript
Star
14.5k
Fork
2.3k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstack/react-native-paper

Tất cả issue của callstack/react-native-paper

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.