Skip to content

Fix Accessibility Violation: Incorrect autocomplete token in Setup Form#25975

Merged
9larsons merged 2 commits into
TryGhost:mainfrom
huangkevin-apr:fix-a11y-bug
Jun 13, 2026
Merged

Fix Accessibility Violation: Incorrect autocomplete token in Setup Form#25975
9larsons merged 2 commits into
TryGhost:mainfrom
huangkevin-apr:fix-a11y-bug

Conversation

@huangkevin-apr

@huangkevin-apr huangkevin-apr commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

Description

This PR addresses an accessibility violation (#25974) on the setup page where the email input field used conflicting autocomplete tokens (username email).

According to WCAG Success Criterion 1.3.5 (Identify Input Purpose), the autocomplete attribute must clearly and singularly define the purpose of the input field. Using multiple tokens that do not align strictly with the input type can confuse browsers and assistive technologies.

Since the input is explicitly defined as @type="email", the most appropriate and compliant token is email.

Related Issue

Close #25974

Changes

Refined the @autocomplete attribute in setup.hbs from "username email" to "email".

Impact

  • Improved Autofill: Browsers will now more reliably suggest the user's saved email addresses.
  • Compliance: Resolves a "Violation" flagged by the IBM Equal Access Accessibility Checker.
  • Cognitive Accessibility: Reduces friction for users with cognitive disabilities who rely on automated field identification.

Validation

Fix Before
image

Fix After
image

This fix ensures that the metadata matches the visual label and the technical input type, providing a smoother onboarding experience for new Ghost administrators.

Additional Info

The patch submitted in this PR was generated by A11YRepair, an automated Web Accessibility repair tool that I developed to address common accessibility violations in web applications. The generated fixes were manually reviewed and validated before submission.


Note

Low Risk
Single-template change to an input attribute; no logic, data handling, or security-sensitive code is affected.

Overview
Fixes the setup form’s email field metadata by changing @autocomplete from "username email" to "email", aligning it with the type="email" input and improving autofill/accessibility behavior.

Written by Cursor Bugbot for commit 4c85a9a. This will update automatically on new commits. Configure here.

@coderabbitai

coderabbitai Bot commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request modifies the setup template to update the autocomplete attribute on the email input field from "username email" to "email". The change addresses an accessibility compliance requirement by ensuring the autocomplete token accurately reflects the input field's specific purpose. No logic, error-handling, or control flow modifications are included.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing an accessibility violation by correcting the autocomplete token in the setup form.
Linked Issues check ✅ Passed The PR fully addresses the requirements from issue #25974 by changing the autocomplete attribute from 'username email' to 'email' to comply with WCAG 1.3.5 and improve browser autofill behavior.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the single attribute modification specified in the linked issue with no extraneous changes or additions beyond the accessibility fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description clearly explains the change: modifying the autocomplete attribute from 'username email' to 'email' in setup.hbs to fix an accessibility violation per WCAG 1.3.5.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

huangkevin-apr and others added 2 commits June 12, 2026 13:27
ref TryGhost#25974

The setup and signup forms used the non-conforming token list
'username email' (the autocomplete grammar allows one field name),
which spec-compliant parsers ignore. 'username' matches the existing
signin form so password managers pair the credential created at
setup/signup with the login form.
@nx-cloud

nx-cloud Bot commented Jun 12, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit da6d43e

Command Status Duration Result
nx run ghost-admin:test ✅ Succeeded 2m 45s View ↗
nx run @tryghost/admin:build ✅ Succeeded 1m 57s View ↗
nx run-many -t lint -p ghost-admin ✅ Succeeded 18s View ↗
nx run ghost:build:assets ✅ Succeeded 2s View ↗
nx run ghost:build:tsc ✅ Succeeded 5s View ↗
nx run-many --target=build --projects=@tryghost... ✅ Succeeded 1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-06-12 18:33:54 UTC

@9larsons 9larsons left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This brings us in line with the sign up form, too. Thanks!

@9larsons 9larsons merged commit cab523e into TryGhost:main Jun 13, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility Violation: Incorrect autocomplete token for email input field

2 participants