Add a hover state for radios and checkboxes #570
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This gives radio buttons and checkboxes a faint grey hover state, except in the following situations:
We originally had this as part of the initial custom radios / checkboxes work, but it was removed. The
@media hover
block wasn’t supported in iOS 9.0 and lower, and without that support ghost checkmarks would remain in place after unchecking them. This was decided to be too off-putting to warrant inclusion. Now that GOV.UK’s browsers and devices page suggests that iOS 9.3+ can be considered a reasonable minimum, we can consider adding hover back in again as a usability enhancement.Fixes #357 .
How has this been tested?
Tested in latest Firefox, Chrome and iOS11 (Simulator). There’s nothing particularly complicated here, and I can’t see any particular problems with support for this. Firefox for Android, IE mobile and iOS9.0 and lower don’t support the
hover
media query, so unchecking a checkbox will leave a ghost checkmark in place until another click happens elsewhere in the page. The usage of these browsers will need to be balanced against the usability enhancement for other browsers. IE9+ should support all the main CSS here without problem.Screenshots (if appropriate):
This is the behaviour with the patch:
What type of change is it?