Skip to content

Commit

Permalink
Fix the aria-label attrs in gr.Chatbot() (#6900)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Jan 2, 2024
1 parent fb9c6ca commit 4511d57
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/happy-rooms-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/chatbot": minor
"gradio": minor
---

feat:Fix the aria-label attrs in `gr.Chatbot()`
10 changes: 8 additions & 2 deletions js/chatbot/shared/ChatBot.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4511d57

Please sign in to comment.