From 08f1c823ad8ad492e93020af0821d66fb1854fc1 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 21 Feb 2026 23:14:09 +0100 Subject: [PATCH] fix(a11y): improve model selector accessibility with proper listbox/option pattern (#21706) - Replace incorrect aria-roledescription='model-item' with role='option' and aria-selected on ModelItem.svelte. The previous attribute was not a valid ARIA role description and provided no useful information to screen readers. - Add contextual aria-label to each model item button (e.g. 'Select GPT-4 model') instead of just the raw model name, making the action clear to screen reader users. - Add role='listbox' and aria-label='Available models' to the scrollable model list container in Selector.svelte so screen readers announce the container's purpose and navigate items correctly. - Make the model selector trigger button's aria-label dynamic: it now announces 'Selected model: GPT-4' when a model is selected, falling back to 'Select a model' when nothing is selected. - Add aria-label to the eject (unload) button in ModelItem.svelte so screen readers announce its purpose. - Add aria-label to the cancel download button in Selector.svelte with the specific model name being canceled. - Improve model profile image alt text from generic 'Model' to contextual '{{modelName}} profile image'. --- src/lib/components/chat/ModelSelector/ModelItem.svelte | 8 +++++--- src/lib/components/chat/ModelSelector/Selector.svelte | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/components/chat/ModelSelector/ModelItem.svelte b/src/lib/components/chat/ModelSelector/ModelItem.svelte index 3cfbf756d8..ebc7c995c2 100644 --- a/src/lib/components/chat/ModelSelector/ModelItem.svelte +++ b/src/lib/components/chat/ModelSelector/ModelItem.svelte @@ -44,8 +44,9 @@