Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

improve chat input accessibility (#2353)

Albin Larssone80e405fe98c
diff --git a/webroot/js/components/chat/chat-input.js b/webroot/js/components/chat/chat-input.js
index 3d3b5dce92..264a1c8073 100644
--- a/webroot/js/components/chat/chat-input.js
+++ b/webroot/js/components/chat/chat-input.js
@@ -347,8 +347,9 @@ export default class ChatInput extends Component {
>
<${ContentEditable}
id="message-input"
+ aria-role="textbox"
class="appearance-none block w-full bg-transparent text-sm text-gray-700 h-full focus:outline-none"
- placeholderText=${placeholderText}
+ aria-placeholder=${placeholderText}
innerRef=${this.formMessageInput}
html=${inputHTML}
disabled=${!inputEnabled}
diff --git a/webroot/styles/chat.css b/webroot/styles/chat.css
index 3bf2ef9326..504b512241 100644
--- a/webroot/styles/chat.css
+++ b/webroot/styles/chat.css
@@ -62,7 +62,7 @@
/* If the div is empty then show the placeholder */
#message-input:empty:before {
- content: attr(placeholderText);
+ content: attr(aria-placeholder);
pointer-events: none;
position: absolute; /* Fixes firefox positioning caret on the right */
display: block; /* For Firefox */