mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 14:20:54 +03:00
improve chat input accessibility (#2353)
Sets aria-role="textbox" and aria-placeholder
This commit is contained in:
parent
3a401991cf
commit
17bf41461c
2 changed files with 3 additions and 2 deletions
|
@ -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}
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue