diff --git a/client/@types/global.d.ts b/client/@types/global.d.ts index 37bae744..13bbbbfc 100644 --- a/client/@types/global.d.ts +++ b/client/@types/global.d.ts @@ -12,6 +12,7 @@ declare const MUSTACHE_CONFIGURATION_CHANNEL: string // Constants that begins with "LOC_" are loaded by build-client.js, reading the english locale file. // See the online documentation: https://livingston.frama.io/peertube-plugin-livechat/contributing/translate/ declare const LOC_ONLINE_HELP: string +declare const LOC_CHAT: string declare const LOC_OPEN_CHAT: string declare const LOC_OPEN_CHAT_NEW_WINDOW: string declare const LOC_CLOSE_CHAT: string diff --git a/client/common/videowatch/chat.ts b/client/common/videowatch/chat.ts index 1dba3b41..249c99e0 100644 --- a/client/common/videowatch/chat.ts +++ b/client/common/videowatch/chat.ts @@ -46,6 +46,8 @@ async function initChat (video: Video): Promise { 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 { diff --git a/languages/en.yml b/languages/en.yml index c560e207..78dd1dce 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -1,3 +1,4 @@ +chat: Chat online_help: "Online help" open_chat: "Open chat" open_chat_new_window: "Open chat in a new window"