mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-21 09:01:47 -05:00
[PR #22091] [CLOSED] fix: add accessible labels and live regions to chat UI #97513
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22091
Author: @devinprater
Created: 3/1/2026
Status: ❌ Closed
Base:
dev← Head:fix/unlabeled-controls📝 Commits (3)
d3b9b19fix: add accessible labels and live regions to chat UI99d644bfix: correct JS escape sequences in markdownToPlainTexta54f37bfix: label More and Integrations toolbar buttons📊 Changes
10 files changed (+2303 additions, -2140 deletions)
View changed files
📝
src/lib/components/chat/MessageInput.svelte(+13 -2)📝
src/lib/components/chat/Messages.svelte(+101 -4)📝
src/lib/components/chat/Messages/Message.svelte(+9 -1)📝
src/lib/components/chat/Messages/ResponseMessage.svelte(+7 -4)📝
src/lib/components/chat/ModelSelector/ModelItem.svelte(+11 -3)📝
src/lib/components/chat/ModelSelector/Selector.svelte(+9 -1)📝
src/lib/components/chat/Navbar.svelte(+5 -1)📝
src/lib/i18n/locales/en-US/translation.json(+2131 -2123)📝
src/lib/stores/index.ts(+7 -0)📝
src/routes/+layout.svelte(+10 -1)📄 Description
Pull Request Checklist
devbranch.dev.fix:Changelog Entry
Description
Fixes 11 WCAG 4.1.2 (Name, Role, Value) violations where icon-only buttons, toggle controls, and interactive elements lacked accessible names. Also adds a proper combobox ARIA pattern to the model selector and global
aria-liveregions so screen readers announce AI response generation status and completed responses.Fixed
MessageInput.svelte— Scroll-to-bottom button, dismiss @-model button, Web Search toggle, Image Generation toggle, Stop generating button, and Send message button all lackedaria-label. Web Search and Image Generation toggles also lackedaria-pressedto communicate their on/off state.Navbar.svelte— Mobile sidebar toggle had noaria-label. Controls button had a hard-coded Englisharia-labelthat did not translate with the UI language.ResponseMessage.svelte— Token usage info button hadaria-hidden="true"on a focusable element (keyboard users could tab to it but hear nothing). Regenerate menu trigger was a non-interactive<div>with no keyboard activation.MessageInput.sveltehidden trigger button: addaria-hidden="true"to exclude it from the accessibility tree.Added
Selector.svelte— Model search input now hasrole="combobox",aria-expanded,aria-controls, andaria-activedescendantso screen readers correctly describe the dropdown relationship.e.preventDefault()added to ArrowUp/ArrowDown to prevent page scroll during keyboard navigation.ModelItem.svelte— Model list items changed from<button>to<div role="option" tabindex="-1" id="model-option-{index}">to correctly participate in the combobox/listbox pattern.aria-labelsimplified toitem.label. Keyboard handler added for Enter/Space.Message.svelte— Screen-reader-only<h3>headings added before each message block so users can skim the conversation by heading level ("You said:", "[Model name] said:", "Assistants said:").Messages.svelte+stores/index.ts++layout.svelte— Globalaria-liveregions placed outside all content areas (in the document root via+layout.svelte) so NVDA browse-mode navigation never lands on them.Messages.sveltewrites generation status ("Generating response…" / "Still generating…" every 6 s) and the completed plain-text response to global Svelte stores. The live region fires on response completion and during streaming.en-US/translation.json— 8 new i18n keys registered for the newaria-labelvalues.Breaking Changes
Additional Information
<ul role="log">that previously surrounded the message list has been changed to a plain<div>because the live region responsibility moved to the globalaria-liveregions in+layout.svelte. Keepingrole="log"on the list would cause double-announcements.#generate-message-pair-buttonis a programmatic trigger (not user-facing);aria-hidden="true"ensures AT does not enumerate it.Screenshots or Videos
No visual changes (all modifications are ARIA attributes and
sr-onlyelements).Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.