Skip to content

Commit 5619271

Browse files
Flodigcornut
authored andcommitted
fix(slideshow-a11y): changed active pagination item width for better a11y
1 parent d9e8747 commit 5619271

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- `Slideshow`: Changed active pagination item width for better a11y.
13+
1014
## [3.9.1][] - 2024-09-17
1115

1216
### Fixed

packages/lumx-core/src/scss/components/slideshow/_index.scss

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
&__pagination {
9494
align-items: center;
9595
// Compute max width for N items based on their size, margin and focus outline
96-
max-width: ($item-max-count * ($item-size + $item-margin-inline)) + $item-focus-outline * 2;
96+
max-width: ($item-max-count * ($item-size + $item-margin-inline)) + $item-focus-outline * 2 + $item-size;
9797
overflow: hidden;
9898
}
9999

@@ -130,32 +130,40 @@
130130
}
131131

132132
#{$self}--theme-light & {
133-
background-color: lumx-color-variant("dark", "L4");
133+
background-color:lumx-color-variant("dark", "L5");
134134

135135
&[data-focus-visible-added] {
136136
@include lumx-state(lumx-base-const("state", "FOCUS"), lumx-base-const("emphasis", "LOW"), "dark");
137137
}
138138

139-
&:hover,
139+
&:hover {
140+
background-color: lumx-color-variant("primary", "N");
141+
}
140142
&--is-active {
141143
background-color: lumx-color-variant("primary", "N");
142-
144+
width: $item-size*2;
145+
border-radius: $lumx-border-radius;
146+
143147
&[data-focus-visible-added] {
144148
@include lumx-state(lumx-base-const("state", "FOCUS"), lumx-base-const("emphasis", "LOW"), "primary");
145149
}
146150
}
147151
}
148152

149153
#{$self}--theme-dark & {
150-
background-color: lumx-color-variant("light", "L4");
154+
background-color: lumx-color-variant("light", "L5");
151155

152156
&[data-focus-visible-added] {
153157
@include lumx-state(lumx-base-const("state", "FOCUS"), lumx-base-const("emphasis", "LOW"), "light");
154158
}
155159

156-
&:hover,
160+
&:hover {
161+
background-color: lumx-color-variant("light", "N");
162+
}
157163
&--is-active {
158164
background-color: lumx-color-variant("light", "N");
165+
width: $item-size*2;
166+
border-radius: $lumx-border-radius;
159167

160168
&[data-focus-visible-added] {
161169
@include lumx-state(lumx-base-const("state", "FOCUS"), lumx-base-const("emphasis", "LOW"), "light");

0 commit comments

Comments
 (0)