Files
llama.cpp/tools/ui/tests/stories/a11y/ActionIcon.a11y.stories.svelte
T
Aleksander Grygier f1357e4998 ui: ESLint config updates (#27700)
* chore: Spacing between sibling elements in html markup

* chore: Formatting and linting rules
2026-08-25 14:34:34 +02:00

36 lines
861 B
Svelte

<script lang="ts" module>
import { Copy } from '@lucide/svelte';
import { defineMeta } from '@storybook/addon-svelte-csf';
import ActionIcon from '$lib/components/app/actions/ActionIcon.svelte';
import { expect } from 'storybook/test';
const { Story } = defineMeta({
component: ActionIcon,
parameters: {
layout: 'centered'
},
tags: ['!dev'],
title: 'Components/ActionIcon/Accessibility'
});
</script>
<Story
asChild
name="SingleTabStop"
play={async ({ canvas, userEvent }) => {
const before = await canvas.findByRole('button', { name: 'before' });
const target = await canvas.findByRole('button', { name: 'Copy' });
before.focus();
await userEvent.tab();
await expect(target).toHaveFocus();
}}
>
<div>
<button type="button">before</button>
<ActionIcon icon={Copy} onclick={() => {}} tooltip="Copy" />
</div>
</Story>