Skip to content

Commit 6ab10e9

Browse files
authored
Merge branch 'next' into ROU-11471
2 parents 852cd94 + 4a6bcab commit 6ab10e9

10 files changed

+38
-2
lines changed

core/src/components/checkbox/checkbox.ionic.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,7 @@ input {
380380
// --------------------------------------------------
381381
// Only show the focus ring when the checkbox is focused and not disabled
382382
:host(.ion-focused:not(.checkbox-disabled)) .native-wrapper {
383-
outline: var(--focus-ring-width) globals.$ion-border-style-solid var(--focus-ring-color);
384-
outline-offset: var(--focus-ring-offset);
383+
@include globals.focused-state(var(--focus-ring-width), globals.$ion-border-style-solid, var(--focus-ring-color));
385384
}
386385

387386
// Checkbox: Active

core/src/components/checkbox/checkbox.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ export class Checkbox implements ComponentInterface {
212212
'in-item': hostContext('ion-item', el),
213213
'checkbox-checked': checked,
214214
'checkbox-disabled': disabled,
215+
'ion-focusable': true,
215216
'checkbox-indeterminate': indeterminate,
216217
interactive: true,
217218
[`checkbox-justify-${justify}`]: justify !== undefined,
72 Bytes
Loading
65 Bytes
Loading
83 Bytes
Loading

core/src/components/segment-button/segment-button.ionic.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@
7979
color: var(--color-disabled);
8080
}
8181

82+
// Segment Button: Focused
83+
// --------------------------------------------------
84+
85+
:host(.ion-focused) .button-inner {
86+
@include globals.focused-state();
87+
}
88+
8289
// Segment Button: Indicator
8390
// --------------------------------------------------
8491

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { expect } from '@playwright/test';
2+
import { configs, test } from '@utils/test/playwright';
3+
4+
configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
5+
test.describe(title('segment: states'), () => {
6+
test('should render focused segment correctly', async ({ page }) => {
7+
await page.setContent(
8+
`
9+
<ion-segment value="2">
10+
<ion-segment-button value="1">
11+
<ion-label>Bookmarks</ion-label>
12+
</ion-segment-button>
13+
<ion-segment-button class="ion-focused" value="2">
14+
<ion-label>Reading List</ion-label>
15+
</ion-segment-button>
16+
<ion-segment-button value="3">
17+
<ion-label>Shared Links</ion-label>
18+
</ion-segment-button>
19+
</ion-segment>
20+
`,
21+
config
22+
);
23+
24+
const segment = page.locator('ion-segment');
25+
26+
await expect(segment).toHaveScreenshot(screenshot(`segment-focused`));
27+
});
28+
});
29+
});
4.39 KB
Loading
5.04 KB
Loading
3.85 KB
Loading

0 commit comments

Comments
 (0)