Skip to content
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

SC 135 -- Autocomplete is required on common form elements #20

Closed
damiansian opened this issue Jan 4, 2025 · 1 comment
Closed

SC 135 -- Autocomplete is required on common form elements #20

damiansian opened this issue Jan 4, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@damiansian
Copy link

damiansian commented Jan 4, 2025

URL

https://demo.fileyourstatetaxes.org/en/questions/phone-number

Issue

To come.

Screen shot

Image

Video walkthrough

auto-complete.mov

WCAG Success Criterion

SC 1.3.5: Identify Input Purpose (Level AA)

Impacted users

To come.

Suggested fix

This suggestion fixes the issues on Mac and PC screen readers and brings the form element up to full WCAG conformance. There are other issues solved for here that have separate bugs filed.

What changed:

  • Added autocomplete (SC 1.3.5)
  • Associated helper text (SC 3.3.2)
  • Added required since skipping entry causes and error (SC 3.3.1 and SC 3.3.2)
  • Used aria-describedby for helper text AND error text.

Current

<label for="state_file_phone_number_form_phone_number"><p class="form-question">Your phone number</p>
<p class="text--help">Enter numbers only</p>
</label>
<input 
    autocomplete="off" 
    autocorrect="off" 
    autocapitalize="off" 
    spellcheck="false" 
    type="text" 
    class="form-width--long text-input" 
    id="state_file_phone_number_form_phone_number" 
    name="state_file_phone_number_form[phone_number]">

    </div>

Should be:

<label id="label" for="phone">Your phone number</label>
<input 
  type="text" 
  name="phone" 
  id="phone" 
  autocomplete="tel" 
  aria-describedby="helper"
  aria-required="true">
<p id="helper">Enter numbers only</p>
</div>
@damiansian
Copy link
Author

Looks good

Autofill picks up phone number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant