[ui] TapHighlight: No browser tap box behind a touched control

This commit is contained in:
2026-11-17 18:53:45 +01:00
parent 0b64c43d4a
commit 938f6ccdeb
2 changed files with 10 additions and 0 deletions
+7
View File
@@ -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([]);
});
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 }) => {
await page.clock.setFixedTime(MORNING);
await open(page);
+3
View File
@@ -36,6 +36,9 @@ body {
color: var(--ink);
font-family: var(--font-body);
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) {