Make the accessibility scan read nested route folders

オープン 初心者向け
#30 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
92/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react-native, typescript

調査の方向性

まず apps/mobile/src/a11y-scan.test.ts から始め、スキャン対象ファイルの一覧に app/oauth/mcp.tsx が含まれることを期待するテストを追加します。issue に記載されたコマンドを実行し、失敗することを確認します。次に、apps/mobile/src/icons.test.ts にある再帰的な readdirSync の例に従い、.tsx ファイルを対象に含め、join() で期待するパスを組み立てます。対象を絞ったテストと pnpm --filter @hermit/mobile test を実行します。必要なファイルがスキャンされ、ラベルのないコントロールがなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
11
フォーク
0
平均マージ
10分
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DojoCodingLabs/hermit のほかの issue

DojoCodingLabs/hermit の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。