github / github/accessibility-scanner
Support configurable login form selectors for non-standard label names
- Vorherrschende Sprache
- TypeScript
- Sterne
- 369
- Forks
- 40
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 10
Beschreibung
## 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.
Beitragsleitfaden
Rechercherichtung
Beginne bei der Authentifizierungsaktion, in der getByLabel(/user ?name/i) und getByLabel(/password/i) die Anmeldefelder finden, und prüfe anschließend, wie optionale Eingaben definiert sind. Unterstütze konfigurierbare Werte für username_selector und password_selector sowie die vorgeschlagenen Fallbacks für den Eingabetyp, und verifiziere, dass nicht standardkonforme oder formularlose Formulare erkannt und authentifiziert gescannt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- accessibility, authentication
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100