[ui] TapHighlight: No browser tap box behind a touched control
This commit is contained in:
@@ -246,6 +246,13 @@ test.describe('the rose, in Prague at 08:00 on 1 March 2026', () => {
|
|||||||
expect((await new AxeBuilder({ page }).analyze()).violations.map((v) => `${v.id}: ${v.help}`)).toEqual([]);
|
expect((await new AxeBuilder({ page }).analyze()).violations.map((v) => `${v.id}: ${v.help}`)).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('a touched control shows no browser tap box (seen on a real Android tablet)', async ({ page }) => {
|
||||||
|
await page.clock.setFixedTime(MORNING);
|
||||||
|
await open(page);
|
||||||
|
const highlight = await page.getByRole('button', { name: en.rose.water }).evaluate((el) => getComputedStyle(el).getPropertyValue('-webkit-tap-highlight-color'));
|
||||||
|
expect(highlight.replace(/\s/g, '')).toBe('rgba(0,0,0,0)');
|
||||||
|
});
|
||||||
|
|
||||||
test('the rose and her care have no accessibility violations', async ({ page }) => {
|
test('the rose and her care have no accessibility violations', async ({ page }) => {
|
||||||
await page.clock.setFixedTime(MORNING);
|
await page.clock.setFixedTime(MORNING);
|
||||||
await open(page);
|
await open(page);
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ body {
|
|||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
font-family: var(--font-body);
|
font-family: var(--font-body);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
/* Android Chrome paints a blue box behind a touched control (seen on a real tablet,
|
||||||
|
2026-11-17); our controls show their own pressed and focus states instead. */
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
|||||||
Reference in New Issue
Block a user