Improved accessibility (#118):

* Adding a role="region" and an aria-label="Chat" on the chat container.
This commit is contained in:
John Livingston
2024-08-20 17:24:18 +02:00
parent 3177c31b08
commit e65bd5c426
3 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,8 @@ async function initChat (video: Video): Promise<void> {
container.setAttribute('id', 'peertube-plugin-livechat-container')
container.setAttribute('peertube-plugin-livechat-state', 'initializing')
container.setAttribute('peertube-plugin-livechat-current-url', window.location.href)
container.role = 'region'
container.ariaLabel = await ptContext.ptOptions.peertubeHelpers.translate(LOC_CHAT)
placeholder.append(container)
try {