Skip to content
Merged
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
10 changes: 5 additions & 5 deletions tests/browser/widget.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1771,8 +1771,8 @@ test("A11Y-501: full supported matrix verification - zoom reflow, forced-colors,
});
await expect(trigger).toBeVisible();
const triggerBox = await trigger.boundingBox();
expect(triggerBox!.width).toBeGreaterThanOrEqual(44);
expect(triggerBox!.height).toBeGreaterThanOrEqual(44);
expect(Math.round(triggerBox!.width)).toBeGreaterThanOrEqual(44);
expect(Math.round(triggerBox!.height)).toBeGreaterThanOrEqual(44);

// Open panel under forced-colors
await trigger.click();
Expand All @@ -1793,13 +1793,13 @@ test("A11Y-501: full supported matrix verification - zoom reflow, forced-colors,
);
expect(noHorizontalOverflow).toBe(true);

// 3. Touch target sizing verification: every visible interactive button >= 44x44px
// 3. Touch target sizing verification: every visible interactive button >= 44x44px (with subpixel tolerance)
const visibleButtons = await panel.locator("button:visible").all();
for (const btn of visibleButtons) {
const box = await btn.boundingBox();
if (box && box.width > 0 && box.height > 0) {
expect(box.width).toBeGreaterThanOrEqual(44);
expect(box.height).toBeGreaterThanOrEqual(44);
expect(Math.round(box.width)).toBeGreaterThanOrEqual(44);
expect(Math.round(box.height)).toBeGreaterThanOrEqual(44);
}
}

Expand Down