fix(a11y): increase panel close button touch target to 44px
Changes h-8 w-8 (32px) to h-11 w-11 (44px) to meet project's minimum touch target standard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -79,7 +79,7 @@ function handleReadClick() {
|
|||||||
data-testid="panel-close"
|
data-testid="panel-close"
|
||||||
onclick={onClose}
|
onclick={onClose}
|
||||||
aria-label={m.transcription_panel_close()}
|
aria-label={m.transcription_panel_close()}
|
||||||
class="flex h-8 w-8 items-center justify-center rounded text-ink-2 transition-colors hover:bg-muted hover:text-ink"
|
class="flex h-11 w-11 items-center justify-center rounded text-ink-2 transition-colors hover:bg-muted hover:text-ink"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
class="h-4 w-4"
|
class="h-4 w-4"
|
||||||
|
|||||||
@@ -119,6 +119,21 @@ describe('TranscriptionPanelHeader', () => {
|
|||||||
await expect.element(page.getByText('0 Abschnitte')).toBeInTheDocument();
|
await expect.element(page.getByText('0 Abschnitte')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should have close button with 44px touch target classes', async () => {
|
||||||
|
render(TranscriptionPanelHeader, {
|
||||||
|
mode: 'read',
|
||||||
|
hasBlocks: true,
|
||||||
|
blockCount: 3,
|
||||||
|
lastEditedAt: null,
|
||||||
|
onModeChange: () => {},
|
||||||
|
onClose: () => {}
|
||||||
|
});
|
||||||
|
|
||||||
|
const closeBtn = document.querySelector('[data-testid="panel-close"]') as HTMLElement;
|
||||||
|
expect(closeBtn.classList.contains('h-11')).toBe(true);
|
||||||
|
expect(closeBtn.classList.contains('w-11')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
it('should show formatted date when lastEditedAt is provided', async () => {
|
it('should show formatted date when lastEditedAt is provided', async () => {
|
||||||
render(TranscriptionPanelHeader, {
|
render(TranscriptionPanelHeader, {
|
||||||
mode: 'read',
|
mode: 'read',
|
||||||
|
|||||||
Reference in New Issue
Block a user