28 ms·
How are people expected to know about the Shift key functionality?
by kayson 2y ago
How are people expected to know about the Shift key functionality?
- kypro 2y agoThat's what I wondered. Presumably services implementing it will add info about using the button before starting the journey, but I'm surprised there's no design system guidance about this. Without that information the button is far less useful.
- kelnos 2y agoYeah, it seems a little obscure. Here's a test page with the functionality: https://design-system.service.gov.uk/components/exit-this-page/default/ https://design-system.service.gov.uk/components/exit-this-pa... One cool thing is when you first hit the shift key once, the "Exit this page" button expands vertically, and shows three small circles, one now filled in. So it makes it obvious that hitting the shift key did something related to that button. So if you hit the shift key for any other reason, you'll see something happen. But still, I agree it seems a little hard to discover.
- Izkata 2y agoOut of curiosity I edited the page to put a textarea on it, so I could see what happens when you're typing a sentence and happen to use Shift 3 times: It breaks the button. If the cursor is in the textarea, tapping Shift without any other keys will add 1 circle, but if that wasn't the 3rd one, any additional Shift will remove all the circles and they don't come back. You have to click outside the textarea and hit Shift 4 times to trigger it (the first one doesn't register any circles). It seems like they tried to prevent accidental triggers (if you have 1 or 2 circles and hit anything except Shift they all disappear, and if you hold Shift while hitting another key you don't get any in the first place), but got something slightly wrong.
- petepete 2y agoThe guidance does cover this in some detail and suggests using an interruption page that explains the behaviour before the risky journey starts. https://design-system.service.gov.uk/patterns/exit-a-page-quickly/#interruption-page https://design-system.service.gov.uk/patterns/exit-a-page-qu...