Simple things are complicated: making a show password option

The GOV.UK Account sign in page

I've written another article for the GDS blog, called Simple things are complicated: making a show password option. It's about what I learned while making a show password component for GOV.UK accounts.

This is my fifth blog post for GDS, which feels like a good achievement. The work it's based on took place back near the start of December, but despite having the idea to write about it I hadn't got around to it until recently.

I wrote it to share what I learned during the development process, so hopefully others can use that information when building their own. There were problems I had to solve that I hadn't expected from the beginning and every example of this functionality I found online implemented it differently.

I initially tried to develop it as an option on our existing input component but fortunately a colleague suggested making it separate. The input component is another thing that looks simple on the surface but is actually really complicated beneath, both in the options available and the underlying code. You might be surprised how much code can go into making two HTML elements.

And that's about it. If you didn't find it useful then hopefully you found it interesting. Until next time...

Related

This article is tagged with