fix(tab-button): use darker text to pass a11y (#27355)
Issue number: N/A --------- - Changes the default Material Design tab color to `$text-color-step-350` or `#a6a6a6` - Changes the default iOS tab color to `$text-color-step-400` or `#999999` - Removes the axe skip in the e2e test These were the minimum color changes needed to pass axe. --------- Co-authored-by: ionitron <hi@ionicframework.com> Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.1 KiB |
@ -7,8 +7,7 @@ configs().forEach(({ title, config }) => {
|
|||||||
test('should not have any axe violations', async ({ page }) => {
|
test('should not have any axe violations', async ({ page }) => {
|
||||||
await page.goto('/src/components/tab-button/test/a11y', config);
|
await page.goto('/src/components/tab-button/test/a11y', config);
|
||||||
|
|
||||||
// TODO FW-3604
|
const results = await new AxeBuilder({ page }).analyze();
|
||||||
const results = await new AxeBuilder({ page }).disableRules('color-contrast').analyze();
|
|
||||||
expect(results.violations).toEqual([]);
|
expect(results.violations).toEqual([]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@ -16,7 +16,7 @@ $overlay-ios-background-color: var(--ion-overlay-background-color,
|
|||||||
$tabbar-ios-background: var(--ion-tab-bar-background, var(--ion-color-step-50, #f7f7f7)) !default;
|
$tabbar-ios-background: var(--ion-tab-bar-background, var(--ion-color-step-50, #f7f7f7)) !default;
|
||||||
$tabbar-ios-background-focused: var(--ion-tab-bar-background-focused, get-color-shade(#fff)) !default;
|
$tabbar-ios-background-focused: var(--ion-tab-bar-background-focused, get-color-shade(#fff)) !default;
|
||||||
$tabbar-ios-border-color: var(--ion-tab-bar-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, .2)))) !default;
|
$tabbar-ios-border-color: var(--ion-tab-bar-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, .2)))) !default;
|
||||||
$tabbar-ios-color: var(--ion-tab-bar-color, $text-color-step-600) !default;
|
$tabbar-ios-color: var(--ion-tab-bar-color, $text-color-step-400) !default;
|
||||||
$tabbar-ios-color-selected: var(--ion-tab-bar-color-selected, ion-color(primary, base)) !default;
|
$tabbar-ios-color-selected: var(--ion-tab-bar-color-selected, ion-color(primary, base)) !default;
|
||||||
|
|
||||||
// iOS Toolbar
|
// iOS Toolbar
|
||||||
|
|||||||
@ -17,7 +17,7 @@ $overlay-md-background-color: var(--ion-overlay-background-color,
|
|||||||
$tabbar-md-background: var(--ion-tab-bar-background, $background-color) !default;
|
$tabbar-md-background: var(--ion-tab-bar-background, $background-color) !default;
|
||||||
$tabbar-md-background-focused: var(--ion-tab-bar-background-focused, get-color-shade(#fff)) !default;
|
$tabbar-md-background-focused: var(--ion-tab-bar-background-focused, get-color-shade(#fff)) !default;
|
||||||
$tabbar-md-border-color: var(--ion-tab-bar-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, .07)))) !default;
|
$tabbar-md-border-color: var(--ion-tab-bar-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, .07)))) !default;
|
||||||
$tabbar-md-color: var(--ion-tab-bar-color, $text-color-step-400) !default;
|
$tabbar-md-color: var(--ion-tab-bar-color, $text-color-step-350) !default;
|
||||||
$tabbar-md-color-selected: var(--ion-tab-bar-color-selected, ion-color(primary, base)) !default;
|
$tabbar-md-color-selected: var(--ion-tab-bar-color-selected, ion-color(primary, base)) !default;
|
||||||
|
|
||||||
// Material Design Toolbar
|
// Material Design Toolbar
|
||||||
|
|||||||