-
Notifications
You must be signed in to change notification settings - Fork 241
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: Can The Exit this Page button stick to the bottom of the page on small screens #2387
Comments
ImplementationSimply changing the component's CSS to use The goodHaving it at the bottom actually interferes less with the 'default' surrounding page than at the top—as it now only covers an already empty area of the footer when scrolled to the end of the page, rather than immediately covering parts of the GOV.UK header and branding. Collapsing mobile browser UIs didn't appear to interfere with it in any recent version of Safari/iOS (tested back to iOS 10) or Chrome/Android (tested back to Android 9). The button simply moved to meet the new 'bottom' of the viewport whenever it shifted. WITH SOME EXCEPTIONS. I don't believe that the button being at the very bottom of the screen is likely to produce a significant number of accidental activations. It is easier to press (from the perspective of someone holding a phone and using their thumbs as the interaction method) but it still requires some effort to reach below the 'resting thumb area' and activate the button. The badIn Safari/iOS (tested back to iOS 10), the button becomes obscured when the virtual keyboard is opened. This is because the keyboard is overlaid on the viewport and the viewport is not actually resized (kinda). It is still possible for the user to scroll the button back into view by scrolling down, and they do not need to scroll the entire length of the document to so, however scrolling up will again obscure the button behind the keyboard. This was not an issue in any Chrome/Android combos I tested. Accidental activations are still easier than if the button was at the top. The uglyAlthough the button now covers an empty part of the footer, it is still overlapping the footer, and visually appears very close to the copyright link. Ideally we'd probably want more space here. |
Thanks @querkmachine for this very thorough investigation. My thoughts on this are that the keyboard covering the button creates too much disruption for this to be worthwhile. Additionally re: the footer, we'd be relying on that space never changing creating a dependancy for this component. I vote keeping it at the top after all. |
There is still, in my mind, a fairly significant problem with it being at the top of the page, however—it covers the page header and any navigation controls within it. As noted elsewhere, we're likely to be adding a skiplink version of the button to the top of the page anyway. I'm wondering if this could do double-duty as a skiplink on desktop and as the sticky button on mobile? I'm not sure how practical that would be given the different visual treatments and viewport-conditional functionality, though. |
This is probably the best idea. A couple of thoughts on this:
|
It's been, rather coincidentally, announced today that the next version of Chrome on Android will change their default viewport sizing behaviour when the keyboard is visible to match Safari on iOS. https://developer.chrome.com/blog/viewport-resize-behavior/ There will be a meta tag switch to use the current behaviour, but this still wouldn't resolve the problem on Safari, so this is an extra push to not place the button along the bottom of the vewport. |
Closing this for now. The lack of visibility of the button when it's positioned at the bottom of the screen, and the virtual keyboard is open, is too problematic for us to consider this viable going forwards. The discussion on whether to use the skiplink variant as the sticky button on mobile will continue elsewhere. |
What
Investigate if it's possible to position the Exit this Page button as a sticky element at the bottom of the page on smaller screens.
Part of #1755
Time limit: 1 week
Why
Following our user research on Exit this Page, there is a split opinion on if the button should go at the top or the bottom of the page on smaller screens.
Pros
Cons
The above are in part conjecture based on expertise so we want to at least do some desk research to verify these.
We previously investigate this but decided that it was premature to investigate before user research. We tracked this in #2117 which contains some useful information.
Who needs to work on this
Developers, Designers
Done when
The text was updated successfully, but these errors were encountered: