Make the accessibility scan read nested route folders

Đang mở Phù hợp với người mới
#30 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
92/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, mobile, testing

Hướng nghiên cứu

Bắt đầu với apps/mobile/src/a11y-scan.test.ts và thêm bài kiểm tra mong đợi app/oauth/mcp.tsx có trong danh sách tệp được quét; chạy lệnh trong issue để xác nhận lệnh thất bại. Sau đó làm theo ví dụ readdirSync đệ quy trong apps/mobile/src/icons.test.ts, giữ lại các tệp .tsx và tạo các đường dẫn mong đợi bằng join(). Chạy bài kiểm tra tập trung và pnpm --filter @hermit/mobile test; hoàn tất khi các tệp cần thiết được quét và không có control nào thiếu nhãn.

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

Mô tả

agent-friendly good first issue

Why

apps/mobile/src/a11y-scan.test.ts checks that every control on every screen has a role and a TalkBack label, but it only reads files directly inside src/app and src/components, so screens in subfolders such as src/app/oauth/ are never scanned. ROADMAP.md, Now: fewer rough edges in the everyday loop.

What to do

Today src/app/oauth/mcp.tsx and src/app/oauth/microsoft.tsx have no controls, so nothing is missed yet; the next control added in a subfolder would be. The list also names app-lock.tsx by hand.

  1. Test first: add a test that the list of scanned files includes app/oauth/mcp.tsx. Run it and watch it fail.
  2. Build the list with readdirSync(dir, { recursive: true }), as apps/mobile/src/icons.test.ts does, keeping .tsx files. Instead of naming app-lock.tsx by hand, include every .tsx file directly inside src.
  3. Run the whole file. The scan must still find no unlabelled control.

Done when

  • The scan reads every .tsx file under src/app and src/components at any depth, and every .tsx file directly inside src.
  • pnpm --filter @hermit/mobile test passes.

How to check

(cd apps/mobile && node --test --experimental-strip-types src/a11y-scan.test.ts)
pnpm --filter @hermit/mobile test

Keep in mind

  • Change only a11y-scan.test.ts, and a11y-scan.ts only if you must. If the wider scan finds a control without a label, fix it in its own pull request: that one changes a screen and needs screenshots.
  • readdirSync with recursive returns paths with the system's separator. Build expected paths with join(), so the test passes on Windows too.
Ngôn ngữ chính
TypeScript
Star
11
Fork
0
Merge trung bình
10 phút
Pull request đã merge (30 ngày)
6

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 DojoCodingLabs/hermit

Tất cả issue của DojoCodingLabs/hermit

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.