Skip to content
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

Fix e2e tests after govuk-frontend update to v5.1.0 #82

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

jsrobertson
Copy link
Contributor

Looking at what is in the 5.1.0 release, it includes a change to radio and checkbox styling, which I believe is what is causing the issue. alphagov/govuk-frontend#4093. It looks like the removal of the z-index on .govuk-radios__input and .govuk-checkboxes__input has meant they now have z-index: auto but the styled label:before and :after have z-index: 1 which causes them to be higher in the z-order than the inputs, which means they’re underneath another element and technically not clickable.

Adding force: true, forces the click on the radio button and checkbox even though it is covered by the labels pseudo elements.

This does not affect the actual usability.

Looking at what is in the 5.1.0 release, it includes a change to radio and checkbox styling, which I believe is what is causing the issue. alphagov/govuk-frontend#4093. It looks like the removal of the `z-index` on `.govuk-radios__input` and `.govuk-checkboxes__input` has meant  they now have `z-index: auto` but the styled `label:before` and :`after` have `z-index: 1` which causes them to be higher in the `z-order` than the inputs, which means they’re underneath another element and technically not clickable.

Adding `force: true`, forces the click on the radio button and checkbox even though it is covered by the labels pseudo elements.

This does not affect the actual usability.
@jsrobertson jsrobertson merged commit 0cc6ae9 into main Feb 8, 2024
2 checks passed
@jsrobertson jsrobertson deleted the fix-e2e-tests branch February 8, 2024 12:44
colinbruce added a commit to ministryofjustice/laa-apply-for-legal-aid that referenced this pull request Feb 20, 2024
A change in govuk frontend caused a shift in z order, so this change allows label clicks
thanks to ministryofjustice/hmpps-accredited-programmes-e2e#82
for pointing me in the direction!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants