New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add 「axeを活用して、アクセシビリティをちゃんと理解しなくても、アクセシビリティを担保したhtmlを書く」 #880
Conversation
/review_gpt |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #880 +/- ##
=======================================
Coverage 96.96% 96.96%
=======================================
Files 17 17
Lines 132 132
Branches 9 9
=======================================
Hits 128 128
Misses 4 4 ☔ View full report in Codecov by Sentry. |
/review_gpt |
add7dde
to
198c094
Compare
/review_gpt |
3 similar comments
/review_gpt |
/review_gpt |
/review_gpt |
198c094
to
1a5c6bb
Compare
review_gpt |
/review_gpt |
1 similar comment
/review_gpt |
1a5c6bb
to
407fa86
Compare
407fa86
to
faa7562
Compare
await axeRunner(page, disableRules) | ||
// eslint-disable-next-line no-plusplus | ||
await page.screenshot({ path: `${basePath}/${i++}.png`, fullPage: true }) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このパッチコードは、PlaywrightとAxeCoreを使用して、ページのアクセシビリティ問題を検出し、テスト結果をスクリーンショットとして保存するためのものです。コードに重大なバグのリスクは見当たりませんが、baseDir
やi
などの変数名はより具体的でわかりやすい名前が望まれます。また、axeRunner()
関数内のエラーハンドリングが十分ではなく、ログを出力しただけでtest.fail()
がコメントアウトされているため、障害発生時の処理を改善する必要があります。
|
||
今回サンプルコードにした内容や、動作確認で使用したコードは全てこちらの PR で作成しており、すべて動作確認可能です。 | ||
|
||
https://github.com/YasushiKobayashi/samples/pull/880 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このパッチは、Jest-axeと@axe-core/playwrightを使用してアクセシビリティテストを実施するための設定や関数が含まれています。jest.setup.jsファイルにAxeのセットアップを行い、単位コンポーネントごとのテストを可能にします。さらにhygenを使用してテンプレート内でテストを作成し、Playwgiht axeを使ってE2Eテストでもアクセシビリティテストを実行します。また、除外設定を含めて各種ルールについても説明されています。提供されたサンプルリポジトリは、すべてのコードと動作確認の PR が含まれているため、参考にしやすいです。
No description provided.