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

Hint text for form fields/Refactor Input Text component #10234

Closed
2 tasks
pollecuttn opened this issue Sep 22, 2023 · 6 comments
Closed
2 tasks

Hint text for form fields/Refactor Input Text component #10234

pollecuttn opened this issue Sep 22, 2023 · 6 comments
Assignees
Labels
epic: accessibility Performance, WCAG 2.0 AA as minimum, and everything else that increases the access to our content needs: dev

Comments

@pollecuttn
Copy link
Contributor

pollecuttn commented Sep 22, 2023

What
Placeholder text disappears when a form field is navigated to. Users need additional cues / hint text whilst filling in a form field.

Where
Form fields

TODO

  • Provide additional cues / hint text that persists whilst filling in a form field
  • Add pattern to Cardigan

Background

From the Hassell Inclusion accessibility audit August 2023.

Dovetail: https://proficient-wallaby-dpwd.dovetailapp.com/insights/Need-additional-cues-for-entering-information-in-form-fields-MjtohTWntPJtuP7J1y1YJ

Miro board: https://miro.com/app/board/uXjVMjsL5YE=/

@pollecuttn pollecuttn added the epic: accessibility Performance, WCAG 2.0 AA as minimum, and everything else that increases the access to our content label Sep 22, 2023
@davidpmccormick davidpmccormick moved this from Backlog to In progress in Digital experience Oct 10, 2023
@davidpmccormick davidpmccormick self-assigned this Oct 10, 2023
@davidpmccormick davidpmccormick moved this from In progress to Backlog in Digital experience Oct 11, 2023
@davidpmccormick davidpmccormick removed their assignment Oct 11, 2023
@pollecuttn pollecuttn moved this from Backlog to Next in Digital experience Oct 25, 2023
@j-jaworski
Copy link

I think we have 2 options here

  1. Use the form elements developed and defined for Wellcome FRP (Funding Relationship Platform product) and have been used across many of the other products at Wellcome.

Designs in Figma
https://www.figma.com/file/6bg5Y3Y4gLXgSdVa8Da8Vy/Wellcome-design-system?type=design&node-id=1429%3A5466&mode=dev&t=ALVqWmijUaT4oAZA-1

Image

  1. Use the UI that is used on this page across the whole site (although I can't point you towards designs for this option)
    https://account.wellcomecollection.org/u/signup?state=hKFo2SAzRk1fLW1sb2hEZlo3dWRrcU1aR0xDRElXaDBlSl9Hb6Fur3VuaXZlcnNhbC1sb2dpbqN0aWTZIGxXLThmUlFqSXQ5WWZGZzZuOGxOT3dIeklfaU9zc01Zo2NpZNkgT3lGdjJIS0E0a1E2d2lDYjFXMDU5S1NMdVg5Z1V6cWg

Image

@j-jaworski j-jaworski moved this from Next to Ready for review in Digital experience Nov 3, 2023
@pollecuttn pollecuttn moved this from Ready for review to Next in Digital experience Nov 7, 2023
@davidpmccormick
Copy link
Contributor

davidpmccormick commented Nov 8, 2023

Option ii. is similar to what we'd previously built ourselves, but I think we reverted to a more traditional (closer to option i.) approach for simplicity a while ago. The example in the link above is actually an Auth0 hosted page, so not an input we have control over.

I think given we moved away from option ii. the obvious route for us to take is to fill out what we already have in line with option i. In this case, would you suggest updating everything in line with the FRP form fields, or just adding the hint text to what we have in the first instance?

We recently updated the validation error messaging (#10318) to include an example email format ('[email protected]') as a result of a related thing that came out of the accessibility consultancy research. From memory, GOV.uk was referenced as the gold-standard of how to handle this – I've just had a look at the Email address pattern in the GOV.uk design system and while it does have hint text, that interestingly doesn't reference the email address format (or include any placeholder). What do you think @j-jaworski?

Currently we always have a <label> which is always visually hidden, and an optional placeholder which will display inside the input as the placeholder attribute if it's present, or if not, the label text will appear as the placeholder. If we kept the visually hidden label but added an optional e.g. hint, then maybe we should move anything that currently appears as placeholder text into this above-the-input 'hint' area? This might lead to a bit of duplication for screenreaders. For example, the (visually-hidden) <label> for this input is 'Your email address', so a screenreader would hear something like, 'Your email address, Your email address e.g. [email protected]'. Not sure if this would be a problem in reality.

Image

Maybe we could take a look at the actual text inputs on the site and make a decision based on that – I don't think there are too many of them.

@rcantin-w
Copy link
Contributor

AFAIK it's only the search bar (which is displayed in an array of pages but always with the same component) and the newsletter pages (the block at the bottom of pages and the one on /newsletter.

@pollecuttn pollecuttn moved this from Next to In progress in Digital experience Nov 21, 2023
@j-jaworski
Copy link

Lots in this and trying to unpack it all and make sense, apologies if I have misunderstood or missed something.

My thoughts:

  • Update form inputs to align with the UI with the FRP (either all together in one ticket or just the hint text field for now, however, you want to split the work)
  • Keep the current validation error messaging for emails
  • Add hint text message that guides the user
  • Where possible remove duplication in the UX copy, specifically between the label and hint text

I have added designs for this pattern to this Figma file
https://www.figma.com/file/juZQR2wi2BsYG8TDH6R4uk/Wellcome-Collection-%E2%80%93-Styles-and-Component-Library-2023?type=design&node-id=1776%3A4028&mode=dev&t=Cu6Gm9mlde1dQRlV-1

Here are some screenshots for reference

Image
Image

@j-jaworski j-jaworski removed their assignment Nov 23, 2023
@pollecuttn pollecuttn moved this from In progress to Next in Digital experience Nov 23, 2023
@rcantin-w
Copy link
Contributor

rcantin-w commented Nov 24, 2023

Ahh I'm sorry, I was very wrong about saying there were only three inputs. I was only thinking about forms and within the main website. I'm not so familiar with Identity yet, so I didn't realise.

I'm throwing a few more in the mix.

Item viewer search:

Image
This one needed a change as you can't even read the whole placeholder, so good to align.

Identity info changes:

Image

Image

There's another modal where you can change your email address that uses the same inputs.
These are interesting because they're different from the two styles in the original ticket description, kind of an in-between. I think it might be a leftover from the fact that (I think?) an agency built Identity (I think?).
Anyway, they can be aligned too, the ones we can't touch in Identity are the ones related to logging in and signing up.

Pagination:

Image
This one is pretty self explanatory and is never empty, so maybe no visible input needed.

Dates filter:

Image

I'm unsure about what should be done here. Similarly to Pagination. They do use a "NumberInput" component versus the others which are "TextInput", so it could behave differently.

@rcantin-w rcantin-w moved this from Next to In progress in Digital experience Dec 4, 2023
@rcantin-w rcantin-w self-assigned this Dec 4, 2023
@rcantin-w rcantin-w changed the title Hint text for form fields Hint text for form fields/Refactor Input Text component Dec 5, 2023
@rcantin-w rcantin-w moved this from In progress to Ready for review in Digital experience Dec 7, 2023
@rcantin-w
Copy link
Contributor

Changes are in prod

@github-project-automation github-project-automation bot moved this from Ready for review to Done in Digital experience Dec 8, 2023
@pollecuttn pollecuttn moved this from Done to Archive in Digital experience Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic: accessibility Performance, WCAG 2.0 AA as minimum, and everything else that increases the access to our content needs: dev
Projects
None yet
Development

No branches or pull requests

4 participants