mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
[PR #13879] [CLOSED] feat: accessibility and restructure settings modal #23318
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/13879
Author: @sinejespersen
Created: 5/14/2025
Status: ❌ Closed
Base:
dev← Head:feature/settings-modal-restructure-and-accessibility📝 Commits (8)
0d64a36add tab button component8fd3d21add various icons0c1a469add ids to modal content for aria-controls2fa2d7cuse icons and tabbutton in settingsmodal5bb9216accessibility/contrast of tabbutton75b9cadadd lang typescript to tabbutton script tagc866c64add admin settings link5738b0fadd w-full to tab button classes📊 Changes
19 files changed (+190 additions, -297 deletions)
View changed files
📝
src/lib/components/chat/Settings/About.svelte(+1 -1)📝
src/lib/components/chat/Settings/Account.svelte(+1 -1)📝
src/lib/components/chat/Settings/Audio.svelte(+1 -0)📝
src/lib/components/chat/Settings/Chats.svelte(+1 -1)📝
src/lib/components/chat/Settings/Connections.svelte(+1 -0)📝
src/lib/components/chat/Settings/General.svelte(+1 -1)📝
src/lib/components/chat/Settings/Interface.svelte(+1 -1)📝
src/lib/components/chat/Settings/Personalization.svelte(+1 -0)📝
src/lib/components/chat/Settings/Tools.svelte(+1 -0)📝
src/lib/components/chat/SettingsModal.svelte(+83 -292)➕
src/lib/components/chat/TabButton.svelte(+21 -0)➕
src/lib/components/icons/Audio.svelte(+12 -0)📝
src/lib/components/icons/Bolt.svelte(+1 -0)➕
src/lib/components/icons/BusinessCard.svelte(+11 -0)➕
src/lib/components/icons/Cloud.svelte(+9 -0)➕
src/lib/components/icons/InfoSolid.svelte(+11 -0)➕
src/lib/components/icons/Monitor.svelte(+11 -0)➕
src/lib/components/icons/SettingsWheel.svelte(+11 -0)➕
src/lib/components/icons/SpeechBubble.svelte(+11 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
As per https://github.com/open-webui/open-webui/discussions/8908
The modal refactor simplifies and streamlines the tab rendering logic by replacing a long, repetitive set of conditional blocks with a scalable approach.
It replaces hardcoded
{#if tabId === ...}blocks with a loop over searchData, which contains tab configuration data (e.g.,id,title,icon, anddisplayTab).Introduces a reusable
<TabButton>component to reduce markup duplication and improve maintainability.The new TabButton component is built to accomodate WCAG 2.1, helping ensure better support for screen readers and keyboard navigation.
role="tab": Explicitly defines the button as a tab in a tablist. See Understanding SC 4.1.2.aria-selected={selected}: Indicates whether the tab is currently active. This is for screen reader users to understand which tab is selected. See Understanding SC 4.1.2.aria-controls={${id}-content}: Links the tab to its corresponding tab panel by ID, allowing assistive tech to associate the tab with the content it controls. That is also why I've added a bunch ofids to content components. Understanding SC 1.3.1:Added
Changed
This PR replaces a tab-style
<buttonelement that navigated to an external site with a standard anchor (<a>).Using a button to navigate is not best practices when it comes to accessibility. Buttons are expected to trigger in-page actions, such as opening a modal or submitting a form, whereas navigation should be handled by links.
And, personally, I also think it was confusing that I clicked a tab and suddenly navigated to a new page, when all the other tabs changed the content of the modal.
Screen readers and other assistive technologies rely on semantic HTML to make the site make sense for users.
See Success Criterion 4.1.2
Deprecated
N/A
Removed
N/A
Fixed
N/A
Security
N/A
Breaking Changes
N/A
Additional Information
Screenshots or Videos
Hover link
Hover menu item
No hover
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.