Fix the aria-label attrs in gr.Chatbot() (#6900)

* Fix the aria-label attrs in `gr.Chatbot()`

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
This commit is contained in:
Yuichiro Tachibana (Tsuchiya) 2024-01-02 16:41:28 +09:00 committed by GitHub
parent fb9c6cacd7
commit 4511d57c46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/chatbot": minor
"gradio": minor
---
feat:Fix the aria-label attrs in `gr.Chatbot()`

View File

@ -173,8 +173,14 @@
}}
dir={rtl ? "rtl" : "ltr"}
aria-label={(j == 0 ? "user" : "bot") +
"'s message:' " +
message}
"'s message: " +
(typeof message === "string"
? message
: `a file of type ${message.file?.mime_type}, ${
message.file?.alt_text ??
message.file?.orig_name ??
""
}`)}
>
{#if typeof message === "string"}
<Markdown