Files
llama_cpp/tools/ui/tests/stories/a11y/ChatMessageStatistics.a11y.stories.svelte
T
viggyandGitHub 42b2d60e57 webui: [a11y] fix keyboard navigation issues in chat interface and sidebar (#23132)
* use child snippets for landing and chat message elements

* make ... icon visible in conversation history menu

* conversation history forward tab fix

* add snippet fix for fork icon in conversation history

* focus/keyboard fix for attachment x icon and scroll left/right

* formatting

* fix scroll down issue

* simply Statistics and pointer events in scrolldown

* create storybook tests and move to folder

* improve tests to actually assert on element
2026-06-04 17:59:00 +02:00

51 lines
1.4 KiB
Svelte

<script module lang="ts">
import { defineMeta } from '@storybook/addon-svelte-csf';
import ChatMessageStatistics from '$lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelte';
import { expect } from 'storybook/test';
const { Story } = defineMeta({
title: 'Components/ChatMessageStatistics/Accessibility',
component: ChatMessageStatistics,
parameters: {
layout: 'centered'
},
tags: ['!dev']
});
</script>
<Story
name="ViewButtonsSingleTabStop"
args={{
promptTokens: 100,
promptMs: 500,
predictedTokens: 200,
predictedMs: 1000,
agenticTimings: {
turns: 1,
toolCallsCount: 1,
toolsMs: 500,
llm: { predicted_n: 200, predicted_ms: 1000, prompt_n: 100, prompt_ms: 500 }
},
hideSummary: false,
isLive: false
}}
play={async ({ canvas, userEvent }) => {
const reading = await canvas.findByRole('button', { name: 'Reading' });
const generation = await canvas.findByRole('button', { name: 'Generation' });
const tools = await canvas.findByRole('button', { name: 'Tools' });
const summary = await canvas.findByRole('button', { name: 'Summary' });
reading.focus();
await expect(reading).toHaveFocus();
await userEvent.tab();
await expect(generation).toHaveFocus();
await userEvent.tab();
await expect(tools).toHaveFocus();
await userEvent.tab();
await expect(summary).toHaveFocus();
}}
/>