diff --git a/.changeset/happy-rooms-suffer.md b/.changeset/happy-rooms-suffer.md new file mode 100644 index 0000000000..aaae69f311 --- /dev/null +++ b/.changeset/happy-rooms-suffer.md @@ -0,0 +1,6 @@ +--- +"@gradio/chatbot": minor +"gradio": minor +--- + +feat:Fix the aria-label attrs in `gr.Chatbot()` diff --git a/js/chatbot/shared/ChatBot.svelte b/js/chatbot/shared/ChatBot.svelte index ee21157e87..3681f0a484 100644 --- a/js/chatbot/shared/ChatBot.svelte +++ b/js/chatbot/shared/ChatBot.svelte @@ -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"}