Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions core/src/components/item/test/a11y/item.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@ import AxeBuilder from '@axe-core/playwright';
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

configs({ directions: ['ltr'], palettes: ['dark'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('item: dark palette'), () => {
/**
* This test was originally created to ensure the item border has sufficient
* contrast. We don't use an Axe test here because Axe not warn about color
* contrast on the item borders.
*/
test('borders should have sufficient contrast', async ({ page }) => {
test.info().annotations.push({
type: 'issue',
description: 'https://github.com/ionic-team/ionic-framework/issues/29386',
});
await page.setContent(
`
<ion-list>
<ion-item>Item</ion-item>
<ion-item>Item</ion-item>
</ion-list>
`,
config
);

const list = page.locator('ion-list');

await expect(list).toHaveScreenshot(screenshot(`item-dark`));
});
});
});

configs({ directions: ['ltr'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('item: axe'), () => {
test('should not have accessibility violations', async ({ page }) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion core/src/css/palettes/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ $colors: (
--ion-background-color-rgb: 18, 18, 18;
--ion-text-color: #ffffff;
--ion-text-color-rgb: 255, 255, 255;
--ion-border-color: #222222;
--ion-background-color-step-50: #1e1e1e;
--ion-background-color-step-100: #2a2a2a;
--ion-background-color-step-150: #363636;
Expand Down