mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
add aria labels to buttons that only contains decorative svgs
This commit is contained in:
parent
2b4d4d2770
commit
fd97882fca
@ -869,6 +869,7 @@
|
|||||||
{#if siblings.length > 1}
|
{#if siblings.length > 1}
|
||||||
<div class="flex self-center min-w-fit" dir="ltr">
|
<div class="flex self-center min-w-fit" dir="ltr">
|
||||||
<button
|
<button
|
||||||
|
aria-label={$i18n.t('Previous message')}
|
||||||
class="self-center p-1 hover:bg-black/5 dark:hover:bg-white/5 dark:hover:text-white hover:text-black rounded-md transition"
|
class="self-center p-1 hover:bg-black/5 dark:hover:bg-white/5 dark:hover:text-white hover:text-black rounded-md transition"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
showPreviousMessage(message);
|
showPreviousMessage(message);
|
||||||
@ -941,9 +942,10 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
showNextMessage(message);
|
showNextMessage(message);
|
||||||
}}
|
}}
|
||||||
|
aria-label={$i18n.t('Next message')}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
fill="none"
|
fill="none"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
@ -966,6 +968,7 @@
|
|||||||
{#if $user?.role === 'user' ? ($user?.permissions?.chat?.edit ?? true) : true}
|
{#if $user?.role === 'user' ? ($user?.permissions?.chat?.edit ?? true) : true}
|
||||||
<Tooltip content={$i18n.t('Edit')} placement="bottom">
|
<Tooltip content={$i18n.t('Edit')} placement="bottom">
|
||||||
<button
|
<button
|
||||||
|
aria-label={$i18n.t('Edit')}
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|
||||||
@ -995,6 +998,7 @@
|
|||||||
|
|
||||||
<Tooltip content={$i18n.t('Copy')} placement="bottom">
|
<Tooltip content={$i18n.t('Copy')} placement="bottom">
|
||||||
<button
|
<button
|
||||||
|
aria-label={$i18n.t('Copy')}
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition copy-response-button"
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition copy-response-button"
|
||||||
@ -1023,6 +1027,7 @@
|
|||||||
{#if $user?.role === 'admin' || ($user?.permissions?.chat?.tts ?? true)}
|
{#if $user?.role === 'admin' || ($user?.permissions?.chat?.tts ?? true)}
|
||||||
<Tooltip content={$i18n.t('Read Aloud')} placement="bottom">
|
<Tooltip content={$i18n.t('Read Aloud')} placement="bottom">
|
||||||
<button
|
<button
|
||||||
|
aria-label={$i18n.t('Read Aloud')}
|
||||||
id="speak-button-{message.id}"
|
id="speak-button-{message.id}"
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
@ -1106,6 +1111,7 @@
|
|||||||
{#if $config?.features.enable_image_generation && ($user?.role === 'admin' || $user?.permissions?.features?.image_generation) && !readOnly}
|
{#if $config?.features.enable_image_generation && ($user?.role === 'admin' || $user?.permissions?.features?.image_generation) && !readOnly}
|
||||||
<Tooltip content={$i18n.t('Generate Image')} placement="bottom">
|
<Tooltip content={$i18n.t('Generate Image')} placement="bottom">
|
||||||
<button
|
<button
|
||||||
|
aria-label={$i18n.t('Generate Image')}
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|
||||||
@ -1185,6 +1191,7 @@
|
|||||||
placement="bottom"
|
placement="bottom"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
|
aria-hidden="true"
|
||||||
class=" {isLastMessage
|
class=" {isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition whitespace-pre-wrap"
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition whitespace-pre-wrap"
|
||||||
@ -1216,6 +1223,7 @@
|
|||||||
{#if !$temporaryChatEnabled && ($config?.features.enable_message_rating ?? true)}
|
{#if !$temporaryChatEnabled && ($config?.features.enable_message_rating ?? true)}
|
||||||
<Tooltip content={$i18n.t('Good Response')} placement="bottom">
|
<Tooltip content={$i18n.t('Good Response')} placement="bottom">
|
||||||
<button
|
<button
|
||||||
|
aria-label={$i18n.t('Good Response')}
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg {(
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg {(
|
||||||
@ -1253,6 +1261,7 @@
|
|||||||
|
|
||||||
<Tooltip content={$i18n.t('Bad Response')} placement="bottom">
|
<Tooltip content={$i18n.t('Bad Response')} placement="bottom">
|
||||||
<button
|
<button
|
||||||
|
aria-label={$i18n.t('Bad Response')}
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg {(
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg {(
|
||||||
@ -1292,6 +1301,7 @@
|
|||||||
{#if isLastMessage}
|
{#if isLastMessage}
|
||||||
<Tooltip content={$i18n.t('Continue Response')} placement="bottom">
|
<Tooltip content={$i18n.t('Continue Response')} placement="bottom">
|
||||||
<button
|
<button
|
||||||
|
aria-label={$i18n.t('Continue Response')}
|
||||||
type="button"
|
type="button"
|
||||||
id="continue-response-button"
|
id="continue-response-button"
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
@ -1328,6 +1338,7 @@
|
|||||||
<Tooltip content={$i18n.t('Regenerate')} placement="bottom">
|
<Tooltip content={$i18n.t('Regenerate')} placement="bottom">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
aria-label={$i18n.t('Regenerate')}
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition regenerate-response-button"
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition regenerate-response-button"
|
||||||
@ -1370,6 +1381,7 @@
|
|||||||
<Tooltip content={$i18n.t('Delete')} placement="bottom">
|
<Tooltip content={$i18n.t('Delete')} placement="bottom">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
aria-label={$i18n.t('Delete')}
|
||||||
id="delete-response-button"
|
id="delete-response-button"
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
@ -1402,6 +1414,7 @@
|
|||||||
<Tooltip content={action.name} placement="bottom">
|
<Tooltip content={action.name} placement="bottom">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
aria-label={action.name}
|
||||||
class="{isLastMessage
|
class="{isLastMessage
|
||||||
? 'visible'
|
? 'visible'
|
||||||
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|
||||||
|
@ -1380,5 +1380,7 @@
|
|||||||
"Your entire contribution will go directly to the plugin developer; Open WebUI does not take any percentage. However, the chosen funding platform might have its own fees.": "Hele dit bidrag går direkte til plugin-udvikleren; Open WebUI tager ikke nogen procentdel. Den valgte finansieringsplatform kan dog have sine egne gebyrer.",
|
"Your entire contribution will go directly to the plugin developer; Open WebUI does not take any percentage. However, the chosen funding platform might have its own fees.": "Hele dit bidrag går direkte til plugin-udvikleren; Open WebUI tager ikke nogen procentdel. Den valgte finansieringsplatform kan dog have sine egne gebyrer.",
|
||||||
"Youtube": "Youtube",
|
"Youtube": "Youtube",
|
||||||
"Youtube Language": "Youtube sprog",
|
"Youtube Language": "Youtube sprog",
|
||||||
"Youtube Proxy URL": "Youtube Proxy URL"
|
"Youtube Proxy URL": "Youtube Proxy URL",
|
||||||
|
"Previous message": "Forrige besked",
|
||||||
|
"Next message": "Næste besked"
|
||||||
}
|
}
|
||||||
|
@ -1380,5 +1380,7 @@
|
|||||||
"Your entire contribution will go directly to the plugin developer; Open WebUI does not take any percentage. However, the chosen funding platform might have its own fees.": "",
|
"Your entire contribution will go directly to the plugin developer; Open WebUI does not take any percentage. However, the chosen funding platform might have its own fees.": "",
|
||||||
"Youtube": "",
|
"Youtube": "",
|
||||||
"Youtube Language": "",
|
"Youtube Language": "",
|
||||||
"Youtube Proxy URL": ""
|
"Youtube Proxy URL": "",
|
||||||
|
"Previous message": "Previous message",
|
||||||
|
"Next message": "Next message"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user