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

Differentiate placeholder and aria labels for text input fields #356

Open
StephDriver opened this issue Apr 9, 2024 · 1 comment
Open
Labels
a11y accessibility

Comments

@StephDriver
Copy link
Contributor

from # 329


The placeholder and the aria label are identical but they serve different purposes. For example in the input for email signup for the news letter:

<input class="
        bg-blue border-white
        text-white cursor-white placeholder:text-white
        max-lg:placeholder:text-md lg:placeholder:text-lg
        max-lg:text-md lg:text-lg
        border-t-0 border-r-0 border-b-1 border-l-0
        focus:outline focus:outline-white focus:outline-offset-0
        focus:ring-transparent focus:border-b-transparent" 
    id="email" 
    type="email" 
    name="EMAIL" 
    value="" 
    aria-label="Your email" 
    placeholder="Your email">

The aria-label should identify that this is input is for an email address for signing up for the newsletter and the placeholder may be better as an example of an email address.


@StephDriver
Copy link
Contributor Author

nb. this issue is to fix this specific instance. A general audit to find more examples and fix them is in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y accessibility
Projects
Status: Triage
Development

No branches or pull requests

1 participant