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 412 -- Text and email buttons have unnecessary aria-describedby #17

Open
damiansian opened this issue Jan 4, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@damiansian
Copy link

damiansian commented Jan 4, 2025

URL

https://demo.fileyourstatetaxes.org/en/questions/contact-preference

Issue

The buttons for "Text me a code" and "Email me a code" have aria-describedby to associate the adjacent heading. The heading is getting read after each button which is confusing.

Note

If this component had two buttons of "Yes" and "No", having the aria-describedby associate the adjacent heading would add value. In this case, since the accessible name of each control is explicit, this step just adds noise to the system.

Image

WCAG Success Criterion

SC 4.1.2: Name, Role, Value (Level A)

User Impact

A screen reader using these controls is getting additional semantics that offer no real value.

Suggested fixes

Current computed accessible name is:

Text me a code, Next, create your account with a quick code

<button 
    name="state_file_contact_preference_form[contact_preference]" 
    type="submit" id="state_file_contact_preference_form_submit" 
    value="text" class="button" 
    aria-describedby="main-question">
Text me a code
</button>

Should be:

Text me a code

<button 
    name="state_file_contact_preference_form[contact_preference]" 
    type="submit" id="state_file_contact_preference_form_submit" 
    value="text" class="button" 
Text me a code
</button>
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
Status: Ticket created
Development

No branches or pull requests

1 participant