mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 05:45:19 +00:00
Merge pull request #13950 from uryukikutani/feature/screen-reader
fix: made the chat response messages readable with a screen reader
This commit is contained in:
commit
bc66755fb0
1 changed files with 16 additions and 0 deletions
|
|
@ -580,6 +580,14 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let screenReaderDiv: HTMLDivElement;
|
||||||
|
|
||||||
|
$: if (message.done) {
|
||||||
|
if (screenReaderDiv) {
|
||||||
|
screenReaderDiv.textContent = message.content;
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<DeleteConfirmDialog
|
<DeleteConfirmDialog
|
||||||
|
|
@ -590,6 +598,14 @@
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div
|
||||||
|
bind:this={screenReaderDiv}
|
||||||
|
aria-live="polite"
|
||||||
|
class="sr-only"
|
||||||
|
>
|
||||||
|
{message.done ? message.content : ''}
|
||||||
|
</div>
|
||||||
|
|
||||||
{#key message.id}
|
{#key message.id}
|
||||||
<div
|
<div
|
||||||
class=" flex w-full message-{message.id}"
|
class=" flex w-full message-{message.id}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue