-
Notifications
You must be signed in to change notification settings - Fork 335
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
[Spike] Add visual escape key indicators to exit this page button #2940
[Spike] Add visual escape key indicators to exit this page button #2940
Conversation
fae4809
to
f64fe58
Compare
18d9c89
to
741cf25
Compare
741cf25
to
53fe00c
Compare
This is looking great! I'll let our lovely designers weigh in more thoroughly on this but some little thoughts:
|
Sorry for the delay looking at this! Some thoughts. When the icons showTo my eye, the 3 circles clutter up the button and, like a lot of icons, have an unclear meaning until you 'activate' them. I'm wondering if the icons should only show after the first time a user presses the escape key? What the icon looks likeI think the 3 dots have a clearer meaning once activated. But like the above point, they do take up quite a bit of space. If we don't think it's a good idea to hide them until someone presses escape, I think we should look at an alternative option. If we do that, let's have devs & designers working more closely together on how that could look. A more detailed point on style – the 1px outlines on the circles look a bit low contrast to me. Don't think it's a WACG issue though AFAIK, what do you reckon @davidc-gds ? Clashes with other icon?I'm not sure if this is captured anywhere else yet, but I know there was a discussion about having a permanent 'exit' icon included in the button to make its function more immediately clear (checking with @Ciandelle??). Options for that icon included one similar to an exit sign, or an arrow. It'd probably sit at the right hand side of the button too. Worth mentioning because if we want to do both, the visual design's gonna have to change so they don't clash with one another. |
My thoughts on this are: I would second @owenatgov comment about users not seeing the last light, I wouldn't expect them to see it unless they had a really slow connection. I agree with @christopherthomasdesign that hiding them before the esc key is used would be a great way of minimising some of aforementioned clutter. I also question if 3 seconds is long enough before the key becomes inactive. Thinking mostly from an accessibility point of view, would there be an instance in which it would take a user longer than that to press the button? Finally on the point of using an icon/arrow, I'm uncertain on the added benefit of this. Although I like the idea from a purely visual stance, I feel that it would make the button too conspicuous, which goes against the key principle of the button. I feel that the button needs to be as simple and close to our others as possible, otherwise we risk drawing a potentially abusive person's attention to something. |
In my experience the third light is visible, albeit briefly, on my (not particularly slow) internet connection. You're right that it's dependent on a whole bunch of factors including network speed and cacheing though. The third light will definitely not be visible if we proceed with the 'ghost page' functionality. My reasoning for having the indicators always be visible was to prevent the button having to resize or change position to account for them becoming visible. We could have it so that they're invisible but still take up space, but that leaves us with a button that is a bit awkwardly sized, regardless of where we put the indicators. |
Oh that's a very fair point the spacing's gonna look weird if we don't show it but leave a space... |
I guess an alternative approach would be to show the indicators outside of the button (e.g. below it)? That way there is still a reserved space, but it's 'invisible' in most circumstances. |
Possibly, though that could open it up to issues with clashing with other content e.g. if used on a heavily zoomed screen and is stuck at the top, where do they go then? I think the 3 dots look ok within the button, but to be sure it's probably worth @Ciandelle and I doing a quick exploration into different visual ideas in case we can come up with something less obtrusive |
f64fe58
to
151c1df
Compare
151c1df
to
9ed44a0
Compare
I've pushed up an amended spike which:
On narrow screens, the indicators appear on top of the content. This does risk that they might be obscured on mobiles, but it is also less likely that the Escape key functionality will be used on mobile resolutions in the first place. I've added |
Would it be reasonable to put a white background behind the indicator area? At least that way it isn't clashing with text, and would just look like an extension of 'the button' on mobile screens and on weirdly failed dark-mode desktop browsers. Black dots on black text isn't high enough contrast 😛 |
Plus 1 to David's latest comment about the white space. Although we might not be expecting users to make use of the escape key on smaller mobile devices, it could still be used. I'm thinking of devices such as portable gaming devices etc where someone can potentially use them without worrying about an abusive person monitoring them. |
It's worth noting that it's possible to plug a portable keyboard into a small screen device. Will users do that? Unlikely but it's a base covering exercise. Also, If we put a white background underneath the button then I'd like to recommend we add some sort of visual divider between the button icon area and the content on the page. Off the top of my head, a border around the icons so that it's almost an extension of the button itself. My thinking here is content on a white background appearing to "disappear" behind this overlay section which otherwise blends into the white background might be confusing to users. |
Mm, I did initally put a white background behind the indicators, but as the code currently only shows and hides the indicators (not the entire indicator container), it meant there was always a white area appearing on top of the content instead. I guess the options are either to:
|
Updated to do both! |
85f6091
to
7cb47de
Compare
220be2d
to
3e10058
Compare
Adding a comment on record that I dig the current implementation! |
bead5ab
to
c78f679
Compare
I have another comment about this feature more generally, which I'm gonna put here because I don't know where else to put it. It's to do with the 'interruption page' we're exploring which introduces the EtP button and explains what it does. This escape key functionality needs JS to work right? And we're treating it as an enhancement, so if a user doesn't have JS, the functionality be available. How does that work for content on the interruption page? Would that need to only show content about the escape key functionality if the user has JS? Feels tricky. Hopefully this isn't a real problem and I've missed something obvious. |
fb8d91e
to
ceb581d
Compare
3e10058
to
69a162b
Compare
d9008de
to
8a968b5
Compare
@christopherthomasdesign Cheers for the input. Firstly, the redesign: Done! I'm a little wary of this. This was trickier than I though as the design is essentially putting the indicator inside the button as before it was a sibling to the button. In this case it's ok because the button is an Secondly, the thoughts on the interrupt page content: Personally, I'm leaning towards not explaining this. I think it's getting too detailed to explain the specifics of a visual enhancement and think just telling folks broadly that the button is there, what it's for, how to use it and what'll happen if you use it are enough. Take that with a big pinch of salt of course, I ain't no content person. |
Having looked at this, I really like the third design as well, though I do understand @owenatgov's comments. I think this is something we need to keep in mind when we are doing future designs. I also agree that we shouldn't over explain the interruption page (side question - do we have a specific github issue for this?) |
I didn't get around to merging this so I'll give that honour to @querkmachine. I have some final thoughts: Re: the button styling stuff, I think considering it's a link and it's right now just for this component that this is fine. It's unlikely from glancing at the backlog that we'll ever want to "extend" the button in the same way. This is a special case and in isolation it's not causing problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ready to go and looking great!
Related to alphagov/govuk-design-system#2390.
A first pass at adding a visual indicator of the 3× escape key functionality on the Hide/Exit This Page button.
Standalone example: https://govuk-frontend-pr-2940.herokuapp.com/components/hide-this-page/preview
Changes
Other changes:
Implementation thoughts
At the moment, I've made it so that the indicator lights are always visible. This is so that the button doesn't need to change size (potentially requiring page content to reflow) when the user hits the escape key.
No part of it concerns itself with screen reader announcements, as that is covered by a different spike: alphagov/govuk-design-system#2386
I've not made any major assumptions about the visual design this could take on. I've started with 'three lights' as that was the idea posed in the initial issue. I've pondered some others, but not prototyped them: