Skip to content

Commit b5a7d0b

Browse files
committed
fix(tab-button): apply code review feedback v1
1 parent cd5c16c commit b5a7d0b

9 files changed

+20
-38
lines changed

core/src/components/tab-button/test/states/tab-button.e2e.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,22 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
8080
});
8181
});
8282
});
83+
84+
configs({ palettes: ['dark'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
85+
test.describe(title('tab-button: focused state in dark palette'), () => {
86+
test('should not have visual regressions for focused tab button', async ({ page }) => {
87+
await page.setContent(
88+
`
89+
<ion-tab-bar style="width: 300px">
90+
<ion-tab-button href="#" class="ion-focused">
91+
<ion-label>Favorites</ion-label>
92+
</ion-tab-button>
93+
</ion-tab-bar>
94+
`,
95+
config
96+
);
97+
98+
await expect(page.locator('ion-tab-bar')).toHaveScreenshot(screenshot('tab-bar-focused-dark'));
99+
});
100+
});
101+
});

core/src/components/tabs/test/a11y/tab-button-dark-focused.e2e.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

core/src/css/palettes/high-contrast-dark.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ $lightest-text-color: $text-color;
186186
--ion-item-background: #1e1e1e;
187187
--ion-toolbar-background: #1f1f1f;
188188
--ion-tab-bar-background: #1f1f1f;
189-
--ion-tab-bar-background-focused: #0b0b0b;
189+
--ion-tab-bar-background-focused: #1b1b1b;
190190
--ion-card-background: #1e1e1e;
191191

192192
/// Only the item borders should increase in contrast

0 commit comments

Comments
 (0)