Skip to content

WCAG issue on input border and placeholder #3

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

Closed
jonathanulco opened this issue Nov 12, 2020 · 2 comments
Closed

WCAG issue on input border and placeholder #3

jonathanulco opened this issue Nov 12, 2020 · 2 comments

Comments

@jonathanulco
Copy link

Hi Tailwind's Team

According to wcag 2.1 graphic elements should have a contrast of at least 3:1
A border colour with a higher contrast than #d1d5db should be proposed as a default.

The same goes for the contrasts of the placeholders. These should have a contrast of at least 4.5:1.

https://www.w3.org/TR/WCAG21/#non-text-contrast

https://www.w3.org/TR/WCAG21/#contrast-minimum

@adamwathan
Copy link
Member

Updated the styles to be much more "raw" and encourage additional styling, and made sure to update these colors to meet those guidelines in the process. If we're going to encourage people to do the styling themselves then really no reason not to 👍

https://tailwindcss-forms.vercel.app/

3288709

@mattgreenfield
Copy link

I've noticed that the placeholder color now differs from the tailwind default (set in preflight).

  • Do you think this fix should also be applied to preflight?
  • Should this typography plugin even be setting a placeholder color if its already in preflight?
    • Possibly not as some users don't use preflight, but those that do are getting more CSS than they need 🤷

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

No branches or pull requests

3 participants