github / github/accessibility-scanner

Support configurable login form selectors for non-standard label names

オープン
#202 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
369
フォーク
40
平均マージ
1日 9時間
マージ済み PR(30日)
10

説明

## Problem

The auth action finds login fields using `getByLabel(/user ?name/i)` and `getByLabel(/password/i)`. This misses common login forms:

- **Email-based login**: "Email", "E-Mail" don't match `/user ?name/i`
- **Non-English apps**: "Benutzername", "Mot de passe" don't match
- **No visible labels**: Forms using only `placeholder` attributes

When no match is found, the login form is not detected and the scanner proceeds unauthenticated.

## Suggested fix

1. **Fall back to input types** when label matching fails: `input[type="password"]` for the password field, and the closest preceding `input[type="text"]` or `input[type="email"]` for the username field.
2. **Make selectors configurable** via optional inputs like `username_selector` and `password_selector`, so users can specify their own labels, placeholders, or CSS selectors for non-standard forms.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

getByLabel(/user ?name/i) と getByLabel(/password/i) でログインフィールドを特定している認証アクションから始め、オプションの入力がどのように定義されているかを確認します。設定可能な username_selector と password_selector の値、および提案されている input-type のフォールバックをサポートし、標準外のフォームやラベルのないフォームが検出され、認証済みとしてスキャンされることを確認します。

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

評価

技術スタック
typescript
領域
accessibility, authentication
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

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

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