Skip to content

Commit 4ca3b6b

Browse files
authored
Merge pull request #2589 from intersective/2.4.y/CORE-8091/restore-btn-size-b4-wcag
[CORE-8091] restore button size for WCAG compliance
2 parents 4aa8ece + 0a89af1 commit 4ca3b6b

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

projects/v3/src/app/components/bottom-action-bar/bottom-action-bar.component.scss

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,29 @@
77
border-top: 1px solid var(--practera-grey-25);
88
background: white;
99

10-
ion-button.ion-focused {
11-
border: 1px solid black;
12-
border-radius: 8px;
10+
ion-button {
11+
min-width: 200px;
12+
flex: 0 1 auto;
13+
14+
// restore padding that was removed by global button reset
15+
--padding-top: 13px;
16+
--padding-bottom: 13px;
17+
min-height: 44px; // WCAG 2.5.8 target size minimum
18+
19+
&.ion-focused {
20+
border: 1px solid black;
21+
border-radius: 8px;
22+
}
23+
24+
// target shadow DOM button to restore padding
25+
&::part(native) {
26+
padding-top: 13px;
27+
padding-bottom: 13px;
28+
}
29+
30+
// ensure proper sizing on desktop
31+
@media (min-width: 768px) {
32+
min-width: 240px;
33+
}
1334
}
1435
}

projects/v3/src/global.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ ion-item-divider {
8484
// Use darker background for WCAG contrast compliance (4.5:1 for normal text)
8585
// color-mix creates darker shade: 60% primary + 40% dark green
8686
background-color: color-mix(in srgb, var(--ion-color-primary) 60%, #1a4d2a);
87-
87+
8888
// Fallback for browsers without color-mix support
8989
@supports not (color-mix(in srgb, white, black)) {
9090
background-color: var(--ion-color-primary-shade, #2a6d3f);
9191
}
92-
92+
9393
color: white;
9494
text-decoration: none;
9595
z-index: 9999;
@@ -173,7 +173,7 @@ p, span, div, ion-label, ion-text {
173173
.icon-button {
174174
background: none;
175175
border: none;
176-
padding: 0;
176+
padding: 0; // WCAG 2.5.8 target size compliance
177177
cursor: pointer;
178178
display: inline-flex;
179179
align-items: center;

0 commit comments

Comments
 (0)