Skip to content

Commit

Permalink
fix: Ensure radio button is accessible by displaying in the DOM. Upda…
Browse files Browse the repository at this point in the history
…te focus borders in donation levels
  • Loading branch information
JoshuaHungDinh committed Dec 19, 2024
1 parent 40f5e3c commit 5d18b5d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/DonationForms/resources/styles/components/_amount.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ $borderColor: #9A9A9A;

&:focus-within {
border-color: var(--givewp-primary-color);
outline: 1px solid var(--givewp-primary-color);
}
}

Expand Down Expand Up @@ -134,6 +135,7 @@ $borderColor: #9A9A9A;
flex: 1;
gap: var(--givewp-spacing-4);
min-width: calc((100% - var(--givewp-spacing-2)) / 2);
outline: none;

@media screen and (min-width: variables.$givewp-breakpoint-sm) {
min-width: calc((100% - var(--givewp-spacing-2) * 2) / 3);
Expand All @@ -143,9 +145,13 @@ $borderColor: #9A9A9A;
flex-basis: 100%;
padding-bottom: var(--givewp-spacing-2);
}
;

.givewp-fields-amount__level {
&:focus {
border-color: var(--givewp-primary-color);
outline: 1px solid var(--givewp-primary-color);
}

&--description {
flex-basis: 110px;

Expand Down Expand Up @@ -264,11 +270,12 @@ $borderColor: #9A9A9A;
}

input[type="radio"] {
display: none;
position: absolute;
z-index: -999;

&:focus {
box-shadow: none;
outline: none;
border-color: var(--givewp-primary-color);
outline: 1px solid var(--givewp-primary-color);
}
}
}
Expand Down

0 comments on commit 5d18b5d

Please sign in to comment.