mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
improve chat input accessibility (#2353)
Sets aria-role="textbox" and aria-placeholder
This commit is contained in:
parent
3a401991cf
commit
17bf41461c
@ -347,8 +347,9 @@ export default class ChatInput extends Component {
|
|||||||
>
|
>
|
||||||
<${ContentEditable}
|
<${ContentEditable}
|
||||||
id="message-input"
|
id="message-input"
|
||||||
|
aria-role="textbox"
|
||||||
class="appearance-none block w-full bg-transparent text-sm text-gray-700 h-full focus:outline-none"
|
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}
|
innerRef=${this.formMessageInput}
|
||||||
html=${inputHTML}
|
html=${inputHTML}
|
||||||
disabled=${!inputEnabled}
|
disabled=${!inputEnabled}
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
/* If the div is empty then show the placeholder */
|
/* If the div is empty then show the placeholder */
|
||||||
#message-input:empty:before {
|
#message-input:empty:before {
|
||||||
content: attr(placeholderText);
|
content: attr(aria-placeholder);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
position: absolute; /* Fixes firefox positioning caret on the right */
|
position: absolute; /* Fixes firefox positioning caret on the right */
|
||||||
display: block; /* For Firefox */
|
display: block; /* For Firefox */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user