fix: add aria-labels to SetupPage inputs and update e2e selectors
- Add aria-label attributes to all form inputs in SetupPage.tsx (Master Password, Confirm Password, Database Path, fail2ban Socket Path, Timezone, Session Duration) for accessibility and test stability - Update e2e tests to use xpath selectors with role=alert instead of class-based selectors for validation messages - Add New Context / New Page per test for browser isolation - Fix API endpoint from /api/setup/status to /api/v1/setup - Fix response field from setup_complete to completed - Simplify password strength test to check aria-live text instead of DOM class traversal - Remove completed task docs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -332,6 +332,7 @@ export function SetupPage(): React.JSX.Element {
|
||||
value={values.masterPassword}
|
||||
onChange={handleChange("masterPassword")}
|
||||
autoComplete="new-password"
|
||||
aria-label="Master Password"
|
||||
/>
|
||||
<div className={styles.passwordStrength} aria-live="polite">
|
||||
<div className={styles.passwordStrengthBar}>
|
||||
@@ -363,6 +364,7 @@ export function SetupPage(): React.JSX.Element {
|
||||
value={values.confirmPassword}
|
||||
onChange={handleChange("confirmPassword")}
|
||||
autoComplete="new-password"
|
||||
aria-label="Confirm Password"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
@@ -375,6 +377,7 @@ export function SetupPage(): React.JSX.Element {
|
||||
<Input
|
||||
value={values.databasePath}
|
||||
onChange={handleChange("databasePath")}
|
||||
aria-label="Database Path"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
@@ -387,6 +390,7 @@ export function SetupPage(): React.JSX.Element {
|
||||
<Input
|
||||
value={values.fail2banSocket}
|
||||
onChange={handleChange("fail2banSocket")}
|
||||
aria-label="fail2ban Socket Path"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
@@ -397,6 +401,7 @@ export function SetupPage(): React.JSX.Element {
|
||||
<Input
|
||||
value={values.timezone}
|
||||
onChange={handleChange("timezone")}
|
||||
aria-label="Timezone"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
@@ -411,6 +416,7 @@ export function SetupPage(): React.JSX.Element {
|
||||
value={values.sessionDurationMinutes}
|
||||
onChange={handleChange("sessionDurationMinutes")}
|
||||
min={1}
|
||||
aria-label="Session Duration (minutes)"
|
||||
/>
|
||||
</Field>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user