mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
Merge pull request #15447 from itk-dev/feature/accessibility-file-item
Feat: accessibility of file input in messageinput
This commit is contained in:
commit
a85ecadfeb
1 changed files with 12 additions and 2 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
import Spinner from './Spinner.svelte';
|
import Spinner from './Spinner.svelte';
|
||||||
import Tooltip from './Tooltip.svelte';
|
import Tooltip from './Tooltip.svelte';
|
||||||
import XMark from '$lib/components/icons/XMark.svelte';
|
import XMark from '$lib/components/icons/XMark.svelte';
|
||||||
|
import { settings } from '$lib/stores';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
@ -71,6 +72,7 @@
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
|
aria-hidden="true"
|
||||||
class=" size-5"
|
class=" size-5"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
|
|
@ -94,7 +96,11 @@
|
||||||
{decodeString(name)}
|
{decodeString(name)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" flex justify-between text-gray-500 text-xs line-clamp-1">
|
<div
|
||||||
|
class=" flex justify-between text-xs line-clamp-1 {($settings?.highContrastMode ?? false)
|
||||||
|
? 'text-gray-800 dark:text-gray-100'
|
||||||
|
: 'text-gray-500'}"
|
||||||
|
>
|
||||||
{#if type === 'file'}
|
{#if type === 'file'}
|
||||||
{$i18n.t('File')}
|
{$i18n.t('File')}
|
||||||
{:else if type === 'doc'}
|
{:else if type === 'doc'}
|
||||||
|
|
@ -128,7 +134,11 @@
|
||||||
{#if dismissible}
|
{#if dismissible}
|
||||||
<div class=" absolute -top-1 -right-1">
|
<div class=" absolute -top-1 -right-1">
|
||||||
<button
|
<button
|
||||||
class=" bg-white text-black border border-gray-50 rounded-full group-hover:visible invisible transition"
|
aria-label={$i18n.t('Remove File')}
|
||||||
|
class=" bg-white text-black border border-gray-50 rounded-full {($settings?.highContrastMode ??
|
||||||
|
false)
|
||||||
|
? ''
|
||||||
|
: 'outline-hidden focus:outline-hidden group-hover:visible invisible transition'}"
|
||||||
type="button"
|
type="button"
|
||||||
on:click|stopPropagation={() => {
|
on:click|stopPropagation={() => {
|
||||||
dispatch('dismiss');
|
dispatch('dismiss');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue