mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-16 23:43:03 +00:00
fix(a11y): add descriptive alt text to images with empty alt attributes
This commit is contained in:
parent
4e2240aada
commit
78076b9100
5 changed files with 7 additions and 7 deletions
|
|
@ -92,7 +92,7 @@
|
|||
<img
|
||||
src={image || `${WEBUI_BASE_URL}/static/favicon.png`}
|
||||
class="rounded-full size-8 object-cover flex-shrink-0"
|
||||
alt=""
|
||||
alt={name}
|
||||
/>
|
||||
<div class="flex-1 text-left min-w-0">
|
||||
<div class="font-medium text-gray-900 dark:text-white truncate">
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
<img
|
||||
src={image || `${WEBUI_BASE_URL}/static/favicon.png`}
|
||||
class="size-8 object-cover"
|
||||
alt=""
|
||||
alt={name}
|
||||
/>
|
||||
</button>
|
||||
<div class="flex-1">
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@
|
|||
: `${WEBUI_API_BASE_URL}/files/${file.url}${file?.content_type ? '/content' : ''}`}
|
||||
<div class={($settings?.chatBubble ?? true) ? 'self-end' : ''}>
|
||||
{#if file.type === 'image' || (file?.content_type ?? '').startsWith('image/')}
|
||||
<Image src={fileUrl} imageClassName=" max-h-96 rounded-lg" />
|
||||
<Image src={fileUrl} alt={$i18n.t('Uploaded image')} imageClassName=" max-h-96 rounded-lg" />
|
||||
{:else}
|
||||
<FileItem
|
||||
item={file}
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@
|
|||
<img
|
||||
src={`${WEBUI_API_BASE_URL}/users/${$user?.id}/profile/image`}
|
||||
class="size-6 object-cover rounded-full"
|
||||
alt=""
|
||||
alt={$user?.name ? $i18n.t("{{name}}'s avatar", { name: $user.name }) : ""}
|
||||
draggable="false"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@
|
|||
>
|
||||
<img
|
||||
src={image.url}
|
||||
alt=""
|
||||
alt={$i18n.t('Generated image')}
|
||||
class="w-full aspect-square object-cover rounded-lg border border-gray-100/30 dark:border-gray-850/30"
|
||||
/>
|
||||
<div
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
{#each sourceImages as image, index}
|
||||
<div class=" relative group">
|
||||
<div class="relative flex items-center">
|
||||
<img src={image} alt="" class="size-10 rounded-xl object-cover" />
|
||||
<img src={image} alt={$i18n.t('Source image')} class="size-10 rounded-xl object-cover" />
|
||||
</div>
|
||||
<div class=" absolute -top-1 -right-1">
|
||||
<button
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@
|
|||
crossorigin="anonymous"
|
||||
src="{WEBUI_BASE_URL}/static/favicon.png"
|
||||
class=" w-6 rounded-full"
|
||||
alt=""
|
||||
alt="Open WebUI logo"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue