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

Add placeholder text info to text input guidance #2152

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

EoinShaughnessy
Copy link
Contributor

Fixes #2149.

Updates our text input guidance to give more detail on why users should not use placeholder text.

@netlify
Copy link

netlify bot commented Apr 25, 2022

You can preview this change here:

Name Link
🔨 Latest commit 708cf71
🔍 Latest deploy log https://app.netlify.com/sites/govuk-design-system-preview/deploys/626964535beb540008207020
😎 Deploy Preview https://deploy-preview-2152--govuk-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@jbuller
Copy link

jbuller commented Apr 25, 2022

May I suggest a rearrangement and rewording, something like:

All text inputs must have visible labels. Labels should be aligned above the text input they refer to. They should be short, direct and written in sentence case. Do not use colons at the end of labels.
Do not use placeholder text, because:...

  • text vanishes when users start typing, which can cause difficulty for people with memory conditions or when reviewing answers.
  • browser default styles for placeholder text often do not meet minimum contrast requirements
  • not all screen readers read out placeholder

@EoinShaughnessy
Copy link
Contributor Author

@davidc-gds @edwardhorsford @jbuller Thanks for your comments and suggestions! I've added a commit that tries to combine your feedback.

@EoinShaughnessy EoinShaughnessy force-pushed the expand-placeholder-content-text-input branch from ac98c1d to a9684ab Compare April 25, 2022 16:02
@EoinShaughnessy EoinShaughnessy force-pushed the expand-placeholder-content-text-input branch from 254a454 to 708cf71 Compare April 27, 2022 15:42
@EoinShaughnessy EoinShaughnessy merged commit f471d25 into main Apr 28, 2022
@EoinShaughnessy EoinShaughnessy deleted the expand-placeholder-content-text-input branch April 28, 2022 16:04
@jbuller
Copy link

jbuller commented Apr 28, 2022

I'm sure you're delighted to get this over the line at last and I'm so pleased to have contributed too :)
I do wonder though if the Placeholder bit deserves its own heading?
I know I've pointed people to this guidance in the past and struggled to find it because it lacked a heading.

@EoinShaughnessy
Copy link
Contributor Author

@jbuller Thanks for your help! We've now added a heading for placeholder text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Expand on not using placeholder text
6 participants