-
Notifications
You must be signed in to change notification settings - Fork 331
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 z-index
of inputs in Radios and Checkboxes component
#4768
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-4768
February 16, 2024 12:42
Inactive
romaricpascal
force-pushed
the
fix-radio-z-index
branch
from
February 16, 2024 12:43
fe69cc3
to
401dc2c
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-4768
February 16, 2024 12:44
Inactive
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for 401dc2c |
Stylesheets changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
index 081ea2694..7f08b23bf 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
@@ -2476,6 +2476,7 @@
}
.govuk-checkboxes__input {
+ z-index: 1;
width: 44px;
height: 44px;
margin: 0;
@@ -4815,6 +4816,7 @@ only screen and (min-resolution:2dppx) {
}
.govuk-radios__input {
+ z-index: 1;
width: 44px;
height: 44px;
margin: 0;
Action run for 401dc2c |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss b/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss
index 5b1223d69..eb2ce95b0 100644
--- a/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss
@@ -24,6 +24,9 @@
}
.govuk-checkboxes__input {
+ // Allow the input to sit above the label, enabling its proper detection
+ // when exploring by touch or using automation tools like Selenium
+ z-index: 1;
width: $govuk-touch-target-size;
height: $govuk-touch-target-size;
margin: 0;
diff --git a/packages/govuk-frontend/dist/govuk/components/radios/_index.scss b/packages/govuk-frontend/dist/govuk/components/radios/_index.scss
index 804aeb214..edb04303b 100644
--- a/packages/govuk-frontend/dist/govuk/components/radios/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/radios/_index.scss
@@ -26,6 +26,9 @@
}
.govuk-radios__input {
+ // Allow the input to sit above the label, enabling its proper detection
+ // when exploring by touch or using automation tools like Selenium
+ z-index: 1;
width: $govuk-touch-target-size;
height: $govuk-touch-target-size;
margin: 0;
Action run for 401dc2c |
owenatgov
approved these changes
Feb 16, 2024
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.
Brill!
Merged
jsrobertson
added a commit
to ministryofjustice/hmpps-accredited-programmes-ui
that referenced
this pull request
Feb 26, 2024
This was added in after a govuk-frontend upgrade. This has now been sorted in 5.2.0 (alphagov/govuk-frontend#4768) so have reverted.
jsrobertson
added a commit
to ministryofjustice/hmpps-accredited-programmes-ui
that referenced
this pull request
Feb 26, 2024
This was added in after a govuk-frontend upgrade. This has now been sorted in 5.2.0 (alphagov/govuk-frontend#4768) so have reverted.
jsrobertson
added a commit
to ministryofjustice/hmpps-accredited-programmes-ui
that referenced
this pull request
Feb 26, 2024
This was added in after a govuk-frontend upgrade. This has now been sorted in 5.2.0 (alphagov/govuk-frontend#4768) so have reverted.
markhobson
added a commit
to acteng/update-your-capital-schemes
that referenced
this pull request
Mar 1, 2024
This was referenced Jun 19, 2024
MartinJJones
added a commit
to alphagov/smart-answers
that referenced
this pull request
Jun 28, 2024
Version 5.1.0 of govuk-frontend contains refactoring to the CSS for radio buttons and checkboxes, this change resulted in tests throwing an `ElementClickInterceptedError`. This was logged as a GitHub issue in govuk-frontend - alphagov/govuk-frontend#4762 This issue was fixed in version 5.2.0 - alphagov/govuk-frontend#4768
MartinJJones
added a commit
to alphagov/smart-answers
that referenced
this pull request
Jul 2, 2024
Version 5.1.0 of govuk-frontend contains refactoring to the CSS for radio buttons and checkboxes, this change resulted in tests throwing an `ElementClickInterceptedError`. This was logged as a GitHub issue in govuk-frontend - alphagov/govuk-frontend#4762 This issue was fixed in version 5.2.0 - alphagov/govuk-frontend#4768
MartinJJones
added a commit
to alphagov/smart-answers
that referenced
this pull request
Jul 5, 2024
Version 5.1.0 of govuk-frontend contains refactoring to the CSS for radio buttons and checkboxes, this change resulted in tests throwing an `ElementClickInterceptedError`. This was logged as a GitHub issue in govuk-frontend - alphagov/govuk-frontend#4762 This issue was fixed in version 5.2.0 - alphagov/govuk-frontend#4768
MartinJJones
added a commit
to alphagov/smart-answers
that referenced
this pull request
Jul 10, 2024
Version 5.1.0 of govuk-frontend contains refactoring to the CSS for radio buttons and checkboxes, this change resulted in tests throwing an `ElementClickInterceptedError`. This was logged as a GitHub issue in govuk-frontend - alphagov/govuk-frontend#4762 This issue was fixed in version 5.2.0 - alphagov/govuk-frontend#4768
MartinJJones
added a commit
to alphagov/smart-answers
that referenced
this pull request
Jul 12, 2024
Version 5.1.0 of govuk-frontend contains refactoring to the CSS for radio buttons and checkboxes, this change resulted in tests throwing an `ElementClickInterceptedError`. This was logged as a GitHub issue in govuk-frontend - alphagov/govuk-frontend#4762 This issue was fixed in version 5.2.0 - alphagov/govuk-frontend#4768
andysellick
pushed a commit
to alphagov/smart-answers
that referenced
this pull request
Jul 15, 2024
Version 5.1.0 of govuk-frontend contains refactoring to the CSS for radio buttons and checkboxes, this change resulted in tests throwing an `ElementClickInterceptedError`. This was logged as a GitHub issue in govuk-frontend - alphagov/govuk-frontend#4762 This issue was fixed in version 5.2.0 - alphagov/govuk-frontend#4768
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
z-index: 1
declaration laying out the input above their corresponding label had disappeared when we updated how the elements were laid out to Flexbox. This broke Selenium testing suites trying to click the input (now covered by its label).This PR reinstates the declaration, and adds automated tests for both components to ensure the order in which the elements are overlaid is checked so we won't miss this in the future.
Closes #4762