Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat: Make Jitsi WCAG 2.1 compliant (#8921)
Steffen Kolmere9675453e1db
diff --git a/css/_atlaskit_overrides.scss b/css/_atlaskit_overrides.scssindex ca1672b83d..519ffaa69c 100644--- a/css/_atlaskit_overrides.scss+++ b/css/_atlaskit_overrides.scss@@ -32,6 +32,18 @@.dropdown-menu div[style*="transform"] {outline: 1px solid #455166;}+ .dropdown-menu button:not(:active):not(:hover) > span {+ color: #B8C7E0;+ }++ /**+ * Override @atlaskit/tab styling when in a modal because the+ * tab text color clash with the modal backgrounds.+ */+ div[role="tablist"] > div:not([data-selected]):not(:hover),+ label > div > span {+ color: #B8C7E0 !important;+ }}/**diff --git a/css/_audio-preview.scss b/css/_audio-preview.scssindex a0140f57ff..5be14b2e0c 100644--- a/css/_audio-preview.scss+++ b/css/_audio-preview.scss@@ -9,6 +9,11 @@max-height: 456px;overflow: auto;width: 300px;+ &-ul {+ margin:0;+ padding:0;+ list-style-type: none;+ }}&-header {@@ -64,7 +69,13 @@&-speaker {position: relative;- &:hover {+ &-ul {+ margin:0;+ padding:0;+ list-style-type: none;+ }++ &:hover, &:focus-within, &:focus {.audio-preview-entry {background: #36383C;margin-left: 0;@@ -81,7 +92,7 @@}.audio-preview-entry-text {- max-width: 196px;+ max-width: 178px;}}@@ -90,7 +101,7 @@}.audio-preview-entry-text {- max-width: 256px;+ max-width: 238px;}}@@ -150,8 +161,9 @@color: #1C2025;cursor: pointer;font-weight: 600;+ font-size: 0.8rem;line-height: 24px;- padding: 2px 16px;+ padding: 2px 8px;position: absolute;right: 16px;top: 5px;@@ -162,4 +174,10 @@right: 16px;top: 14px;}++ // Override @atlaskit/InlineDialog container which is made with styled components+ & > div:nth-child(2) {+ outline: none;+ padding: 0;+ }}diff --git a/css/_aui_reset.scss b/css/_aui_reset.scssindex 66716cca3d..3f36131fa8 100644--- a/css/_aui_reset.scss+++ b/css/_aui_reset.scss@@ -219,8 +219,9 @@ abbr {}a {- color: #3572b0;+ color: #44A5FF;text-decoration: none;+ font-weight: bold;}a:focus,a:hover,diff --git a/css/_avatar.scss b/css/_avatar.scssindex 9c0d88bddc..a66816213d 100644--- a/css/_avatar.scss+++ b/css/_avatar.scss@@ -1,7 +1,7 @@.avatar {background-color: #AAA;border-radius: 50%;- color: rgba(255, 255, 255, 0.6);+ color: rgba(255, 255, 255, 1);font-weight: 100;object-fit: cover;@@ -25,10 +25,6 @@width: 100%;}-.defaultAvatar {- opacity: 0.6-}-.avatar-badge {position: relative;diff --git a/css/_chat.scss b/css/_chat.scssindex 16b5ee2254..b884bd9ffc 100644--- a/css/_chat.scss+++ b/css/_chat.scss@@ -99,18 +99,19 @@div {svg {cursor: pointer;- fill: white+ fill: white;}}}+.chat-header {height: 70px;position: relative;width: 100%;z-index: 1;display: flex;- justify-content: flex-end;+ justify-content: space-between;padding: 16px;align-items: center;box-sizing: border-box;@@ -132,6 +133,7 @@.send-button {background: #1B67EC;cursor: pointer;+ margin-left: 0.3rem;@media (hover: hover) and (pointer: fine) {&:hover {@@ -188,8 +190,9 @@display: flex;align-items: center;justify-content: center;- height: 40px;- width: 40px;+ height: 38px;+ width: 38px;+ margin: 2px;border-radius: 3px;}@@ -226,6 +229,11 @@border: 0px none;box-shadow: none;}+#usermsg:focus,+#usermsg:active {+ border-bottom: 1px solid white;+ padding-bottom: 8px;+ }#nickname {text-align: center;@@ -234,6 +242,16 @@margin: auto 0;padding: 0 16px;+ #nickname-title {+ margin-bottom: 5px;+ display: block;+ }++ label[for="nickinput"] {+ > div > span {+ color: #B8C7E0;+ }+ }input {height: 40px;}@@ -254,7 +272,7 @@cursor: pointer;&.disabled {- color: #757575;+ color: #AFB6BC;background: #11336E;pointer-events: none;}@@ -301,6 +319,19 @@}}+.sr-only {+ border: 0 !important;+ clip: rect(1px, 1px, 1px, 1px) !important;+ clip-path: inset(50%) !important;+ height: 1px !important;+ margin: -1px !important;+ overflow: hidden !important;+ padding: 0 !important;+ position: absolute !important;+ width: 1px !important;+ white-space: nowrap !important;+}+.chatmessage {background-color: $chatRemoteMessageBackgroundColor;border-radius: 0px 6px 6px 6px;@@ -350,10 +381,6 @@color: #757575;}-.smiley {- font-size: 14pt;-}-#smileys {font-size: 20pt;margin: auto;@@ -382,7 +409,7 @@box-sizing: border-box;background-color: rgba(0, 0, 0, .6) !important;height: auto;- max-height: 0;+ display: none;overflow: hidden;position: absolute;width: calc(#{$sidebarWidth} - 32px);@@ -398,6 +425,7 @@transition: max-height 0.3s;&.show-smileys {+ display: flex;max-height: 500%;}@@ -413,7 +441,7 @@.smileyContainer {width: 40px;- height: 36px;+ height: 40px;display: inline-block;text-align: center;}@@ -509,7 +537,7 @@&-header {display: flex;- justify-content: flex-end;+ justify-content: space-between;align-items: center;margin: 16px;width: calc(100% - 32px);diff --git a/css/_e2ee.scss b/css/_e2ee.scssindex eadd577d8b..8b25562b2c 100644--- a/css/_e2ee.scss+++ b/css/_e2ee.scss@@ -8,7 +8,10 @@.read-more {cursor: pointer;- opacity: .7;+ opacity: .9;+ color: #fff;+ font-size: 0.8rem;+ font-weight: bold;}}diff --git a/css/_meetings_list.scss b/css/_meetings_list.scssindex 2555d6ba64..ecbc76f7f1 100644--- a/css/_meetings_list.scss+++ b/css/_meetings_list.scss@@ -125,7 +125,8 @@cursor: pointer;}- &.with-click-handler:hover {+ &.with-click-handler:hover,+ &.with-click-handler:focus {background-color: #c7ddff;}@@ -158,7 +159,7 @@}}- .item:hover {+ .item:hover, .item:focus, .item:focus-within {.delete-meeting {display: block;}diff --git a/css/_prejoin.scss b/css/_prejoin.scssindex f67f5f1c8e..e5084b1abc 100644--- a/css/_prejoin.scss+++ b/css/_prejoin.scss@@ -3,6 +3,15 @@&-input-area {margin: 0 auto;text-align: center;++ &-label {+ display: block;+ margin-bottom: 5px;+ color: #ffffff;+ font-weight: 300;+ font-size: 15px;+ line-height: 24px;+ }}&-title {@@ -74,10 +83,10 @@z-index: 1;&--warning {- background: rgba(241, 173, 51, 0.7)+ background: rgba(241, 173, 51, 1);}&--ok {- background: rgba(49, 183, 106, 0.7);+ background: rgba(49, 183, 106, 1);}}@@ -92,6 +101,8 @@&-error-desc {margin-right: 4px;+ color: #fff;+ font-weight: bold;}.settings-button-container {diff --git a/css/_premeeting-screens.scss b/css/_premeeting-screens.scssindex 3c2f8b0cd9..928a91df84 100644--- a/css/_premeeting-screens.scss+++ b/css/_premeeting-screens.scss@@ -113,7 +113,7 @@cursor: pointer;color: #fff;display: flex;- flex-direction: row;+ flex-direction: column;font-size: 15px;font-weight: 300;justify-content: center;@@ -139,6 +139,9 @@margin-left: 10px;}}+ .copy-button{+ width: 298px;+ }.copy-meeting-text {width: 266px;@@ -177,7 +180,7 @@}&.focused {- box-shadow: 0px 0px 4px 3px #0376DA;+ box-shadow: 0px 0px 1px 1.5px black, 0px 0px 1.3px 4px white;}}}@@ -249,6 +252,10 @@fill: transparent;}+ label {+ cursor: pointer;+ }+&:hover {background: rgba(255, 255, 255, 0.1);diff --git a/css/_recording.scss b/css/_recording.scssindex cff7846e6f..866cbccf65 100644--- a/css/_recording.scss+++ b/css/_recording.scss@@ -105,6 +105,7 @@.helper-link {cursor: pointer;+ font-weight: bold;display: inline-block;flex-shrink: 0;margin-left: auto;diff --git a/css/_toolbars.scss b/css/_toolbars.scssindex ffa4301736..023f9237bf 100644--- a/css/_toolbars.scss+++ b/css/_toolbars.scss@@ -54,6 +54,7 @@margin-bottom: 16px;position: relative;z-index: $toolbarZ;+ pointer-events: none;.button-group-center,.button-group-left,@@ -103,6 +104,7 @@flex-direction: column;margin: 0 auto;max-width: 100%;+ pointer-events: all;}.toolbox-content-items {@@ -112,6 +114,7 @@margin: 0 auto;padding: 6px;text-align: center;+ pointer-events: all;>div {margin-left: 8px;diff --git a/css/_video-preview.scss b/css/_video-preview.scssindex 200402d21e..0b4754eeab 100644--- a/css/_video-preview.scss+++ b/css/_video-preview.scss@@ -79,4 +79,8 @@white-space: nowrap;}}+ // Override @atlaskit/InlineDialog container which is made with styled components+ & > div:nth-child(2) {+ padding: 0;+ }}diff --git a/css/_videolayout_default.scss b/css/_videolayout_default.scssindex f82fb31fd3..5cd3462a70 100644--- a/css/_videolayout_default.scss+++ b/css/_videolayout_default.scss@@ -428,7 +428,7 @@right: 0;z-index: $zindex2;width: 18px;- height: 13px;+ height: 18px;color: #FFF;font-size: 10pt;margin-right: $remoteVideoMenuIconMargin;diff --git a/css/buttons/copy.scss b/css/buttons/copy.scssindex 20867ce516..b381c09ae7 100644--- a/css/buttons/copy.scss+++ b/css/buttons/copy.scss@@ -3,7 +3,7 @@justify-content: space-between;align-items: center;padding: 8px 8px 8px 16px;- margin-top: 8px;+ margin-top: 5px;width: calc(100% - 24px);height: 24px;diff --git a/css/components/_input-slider.scss b/css/components/_input-slider.scssindex 57c518fc7a..80263c6f9a 100644--- a/css/components/_input-slider.scss+++ b/css/components/_input-slider.scss@@ -9,10 +9,10 @@ input[type=range]{}/**- * Disable the default focus styles for webkit range inputs (sliders).+ * Show focus for keyboard accessibility.*/input[type=range]:focus {- outline: none;+ outline: 1px solid white !important;}/**diff --git a/css/filmstrip/_filmstrip_toolbar.scss b/css/filmstrip/_filmstrip_toolbar.scssindex 13f99f945b..852dabdfd2 100644--- a/css/filmstrip/_filmstrip_toolbar.scss+++ b/css/filmstrip/_filmstrip_toolbar.scss@@ -16,7 +16,6 @@padding: 0;margin: 0;border: none;- outline: none;-webkit-appearance: none;diff --git a/css/filmstrip/_tile_view.scss b/css/filmstrip/_tile_view.scssindex 4469deba78..4c5d07ec9d 100644--- a/css/filmstrip/_tile_view.scss+++ b/css/filmstrip/_tile_view.scss@@ -7,7 +7,7 @@* see.*/.active-speaker {- box-shadow: 0 0 5px 3px $videoThumbnailSelected+ box-shadow: 0px 0px 1px 1.5px black, 0px 0px 1.3px 4px $videoThumbnailSelected;}#filmstripRemoteVideos {diff --git a/css/filmstrip/_vertical_filmstrip_overrides.scss b/css/filmstrip/_vertical_filmstrip_overrides.scssindex 1c06c80df0..5d6c586382 100644--- a/css/filmstrip/_vertical_filmstrip_overrides.scss+++ b/css/filmstrip/_vertical_filmstrip_overrides.scss@@ -81,7 +81,7 @@.local-video-menu-trigger,.remote-video-menu-trigger {- margin-bottom: 7px;+ margin-bottom: 3px;margin-left: $remoteVideoMenuIconMargin;}}diff --git a/css/modals/device-selection/_device-selection.scss b/css/modals/device-selection/_device-selection.scssindex 2902868cbd..a7d48c042f 100644--- a/css/modals/device-selection/_device-selection.scss+++ b/css/modals/device-selection/_device-selection.scss@@ -103,7 +103,7 @@font-size: 14px;a {- color: #2684FF;+ color: #6FB1EA;cursor: pointer;text-decoration: none;}@@ -119,7 +119,7 @@height: 8px;.audio-input-preview-level {- background: #4C9AFF;+ background: #75B1FF;border-radius: 5px;height: 100%;-webkit-transition: width .1s ease-in-out;diff --git a/css/modals/feedback/_feedback.scss b/css/modals/feedback/_feedback.scssindex 29977fe886..05ee41e7b1 100644--- a/css/modals/feedback/_feedback.scss+++ b/css/modals/feedback/_feedback.scss@@ -94,5 +94,9 @@};}+ .star-btn:focus,+ .star-btn:active {+ outline: 1px solid #B8C7E0;+ }}}diff --git a/css/modals/invite/_info.scss b/css/modals/invite/_info.scssindex a021c5d30c..9eed4e5b68 100644--- a/css/modals/invite/_info.scss+++ b/css/modals/invite/_info.scss@@ -30,20 +30,26 @@overflow: hidden;text-overflow: ellipsis;white-space: nowrap;+ margin-right: 5px;}.info-password-none,.info-password-remote {- opacity: 0.5;+ color: #fff;}.info-password-input {width: 100%;- background-color: transparent;- border: none;+ background-color: #0E1624;+ border-radius: 3px;+ border: 2px solid #202B3D;color: inherit;padding-left: 0;}+ .info-password-input:focus ,+ .info-password-input:active {+ border: 2px solid #B8C7E0;+ }.info-password-local {user-select: text;diff --git a/css/modals/invite/_invite_more.scss b/css/modals/invite/_invite_more.scssindex 606aca5205..0b0198feec 100644--- a/css/modals/invite/_invite_more.scss+++ b/css/modals/invite/_invite_more.scss@@ -130,6 +130,7 @@display: inline-block;vertical-align: middle;cursor: pointer;+ height: 24px;}}@@ -141,7 +142,7 @@& > a {display: inline-block;height: 24px;- width: 48px;+ min-width: 48px;border-radius: 3px;text-align: center;text-decoration: none;diff --git a/css/modals/settings/_settings.scss b/css/modals/settings/_settings.scssindex 1b4d730ff7..78019c37ca 100644--- a/css/modals/settings/_settings.scss+++ b/css/modals/settings/_settings.scss@@ -16,12 +16,19 @@}.mock-atlaskit-label {- color: #56637A;+ color: #b8c7e0;font-size: 12px;font-weight: 600;line-height: 1.33;padding: 20px 0px 4px 0px;}+ input[type="checkbox"]:checked + svg {+ --checkbox-background-color: #6492e7;+ --checkbox-border-color: #6492e7;+ }+ input[type="checkbox"] + svg + span {+ color: #b8c7e0;+ }input[type="checkbox"] + svg + span {color: #9FB0CC;@@ -65,4 +72,14 @@.sign-out-cta {margin-bottom: 20px;}++ @media only screen and (max-width: $smallScreen) {+ .device-selection {+ display: flex;+ flex-direction: column;+ }+ .more-tab {+ flex-direction: column;+ }+ }}diff --git a/css/modals/video-quality/_video-quality.scss b/css/modals/video-quality/_video-quality.scssindex b83d564caa..855f584b31 100644--- a/css/modals/video-quality/_video-quality.scss+++ b/css/modals/video-quality/_video-quality.scss@@ -86,6 +86,7 @@.video-quality-dialog-label-container.active {color: $videoQualityActive;+ font-weight: bold;&::before {background: $videoQualityActive;diff --git a/css/modals/virtual-background/_virtual-background.scss b/css/modals/virtual-background/_virtual-background.scssindex 6871b53f84..afe97bd502 100644--- a/css/modals/virtual-background/_virtual-background.scss+++ b/css/modals/virtual-background/_virtual-background.scss@@ -7,9 +7,7 @@grid-template-columns: auto auto auto auto auto;column-gap: 9px;cursor: pointer;- .desktop-share:hover, .thumbnail:hover, .blur:hover, .slight-blur:hover, .virtual-background-none:hover{- height: 56px;- width: 103px;+ .desktop-share:hover, .thumbnail:hover, .blur:hover, .slight-blur:hover, .virtual-background-none:hover{opacity: .5;border: 2px solid #99bbf3;@media (min-width: 432px) and (min-width: 432px) and (max-width: 632px) {@@ -21,152 +19,75 @@width: 56px;}}- .thumbnail {+ .background-option {margin-top: 8px;border-radius: 6px;- object-fit: cover;height: 60px;width: 107px;+ text-align: center;+ justify-content: center;+ font-weight: bold;+ box-sizing: border-box;+ display: flex;+ align-items: center;+ }+ .thumbnail {+ object-fit: cover;}.thumbnail:hover ~ .delete-image-icon {display: block;}.thumbnail-selected {- margin-top: 8px;- border-radius: 6px;object-fit: cover;- height: 56px;- width: 103px;border: 2px solid #246FE5;}.blur{box-shadow: inset 0 0 12px #000000;- margin-top: 8px;background: #7E8287;- font-weight: bold;- height: 60px;- width: 107px;- border-radius: 6px;- text-align: center;- vertical-align: middle;- line-height: 60px;+ padding: 0 10px;}.blur-selected {box-shadow: inset 0 0 12px #000000;- margin-top: 8px;background: #7E8287;- font-weight: bold;- height: 56px;- width: 103px;- border-radius: 6px;border: 2px solid #246FE5;- text-align: center;- vertical-align: middle;- line-height: 60px;+ padding: 0 10px;}.slight-blur{box-shadow: inset 0 0 12px #000000;- margin-top: 8px;background: #A4A4A4;- font-weight: bold;- height: 60px;- width: 107px;- border-radius: 6px;- text-align: center;- vertical-align: middle;- line-height: 60px;+ padding: 0 10px;}.slight-blur-selected{box-shadow: inset 0 0 12px #000000;- margin-top: 8px;background: #A4A4A4;- font-weight: bold;- height: 56px;- width: 103px;- border-radius: 6px;border: 2px solid #246FE5;- text-align: center;- vertical-align: middle;- line-height: 60px;+ padding: 0 10px;}.virtual-background-none {- margin-top: 8px;background: #525252;- font-weight: bold;- height: 60px;- width: 107px;- border-radius: 6px;- text-align: center;- vertical-align: middle;- line-height: 60px;+ padding: 0 10px;}.none-selected {- margin-top: 8px;background: #525252;- font-weight: bold;- height: 56px;- width: 103px;- border-radius: 6px;border: 2px solid #246FE5;- text-align: center;- vertical-align: middle;- line-height: 60px;+ padding: 0 10px;}+.desktop-share{- margin-top: 8px;background: #525252;- font-weight: bold;- height: 60px;- width: 107px;- border-radius: 6px;- text-align: center;- vertical-align: middle;- line-height: 60px;}.desktop-share-selected{- margin-top: 8px;background: #525252;- font-weight: bold;- height: 56px;- width: 103px;- border-radius: 6px;border: 2px solid #246FE5;- text-align: center;- vertical-align: middle;- line-height: 60px;- }- .share-desktop-icon{- margin-top: 15%;+ padding: 0 10px;}@media (min-width: 432px) and (max-width: 632px) {font-size: 1.5vw;- .share-desktop-icon{- margin-top: 25%;- }- .desktop-share, .virtual-background-none, .thumbnail, .blur, .slight-blur{- height: 60px;- width: 60px;- }- .desktop-share-selected, .thumbnail-selected, .none-selected, .blur-selected, .slight-blur-selected{- height: 56px;- width: 56px;- }}@media (max-width: 432px){- .share-desktop-icon{- margin-top: 25%;- }font-size: 1.5vw;- .desktop-share, .virtual-background-none, .thumbnail, .blur, .slight-blur{- height: 60px;- width: 60px;- }- .desktop-share-selected, .thumbnail-selected, .none-selected, .blur-selected, .slight-blur-selected{- height: 56px;- width: 56px;- }}}@@ -205,12 +126,18 @@left: 51px}}+.delete-image-icon:hover {display: block;}.thumbnail-container {position: relative;+ &:focus-within {+ .thumbnail ~ .delete-image-icon{+ display: block;+ }+ }}.add-background{diff --git a/css/themes/_light.scss b/css/themes/_light.scssindex 21cc759fa4..49854d8f5f 100644--- a/css/themes/_light.scss+++ b/css/themes/_light.scss@@ -107,4 +107,4 @@ $selectActiveItemBg: darken($controlBackground, 20%);/*** TODO: Replace by themed component.*/-$videoQualityActive: #4C9AFF;+$videoQualityActive: #57A0ff;diff --git a/index.html b/index.htmlindex a1f9bdbca1..361239fb88 100644--- a/index.html+++ b/index.html@@ -186,10 +186,10 @@<!--#include virtual="static/settingsToolbarAdditionalContent.html" --></head><body>- <noscript>+ <noscript aria-hidden="true"><div>JavaScript is disabled. </br>For this site to work you have to enable JavaScript.</div></noscript><!--#include virtual="body.html" -->- <div id="react"></div>+ <div id="react" role="main"></div></body></html>diff --git a/lang/main-de.json b/lang/main-de.jsonindex e4b87ed3d2..872c147ae4 100644--- a/lang/main-de.json+++ b/lang/main-de.json@@ -70,12 +70,17 @@},"privateNotice": "Private Nachricht an {{recipient}}","title": "Chatten",- "you": "Sie"+ "you": "Sie",+ "message": "Nachricht",+ "messageAccessibleTitle": "{{user}} sagt:",+ "messageAccessibleTitleMe": "Ich sage:",+ "smileysPanel": "Emoji-Auswahl"},"chromeExtensionBanner": {"installExtensionText": "Installieren Sie die Erweiterung für die Integration von Google Calendar und Office 365","buttonText": "Chrome-Erweiterung installieren",- "dontShowAgain": "Hinweis nicht mehr anzeigen"+ "dontShowAgain": "Hinweis nicht mehr anzeigen",+ "close": "Schließen"},"connectingOverlay": {"joiningRoom": "Eine Verbindung zu Ihrem Meeting wird hergestellt…"@@ -204,6 +209,8 @@"e2eeLabel": "Ende-zu-Ende-Verschlüsselung aktivieren","e2eeWarning": "WARNUNG: Nicht alle Personen dieser Konferenz scheinen Ende-zu-Ende-Verschlüsselung zu unterstützen. Wenn Sie diese aktivieren, können die entsprechenden Personen nichts mehr sehen oder hören.","enterDisplayName": "Bitte geben Sie hier Ihren Namen ein",+ "enterDisplayNameToJoin" : "Benutzername für Konferenz eingeben" ,+ "embedMeeting": "Besprechung einbetten","error": "Fehler","gracefulShutdown": "Der Dienst steht momentan wegen Wartungsarbeiten nicht zur Verfügung. Bitte versuchen Sie es später noch einmal.","grantModeratorDialog": "Möchten Sie wirklich Moderationsrechte an diese Person vergeben?",@@ -295,7 +302,7 @@"Share": "Teilen","shareVideoLinkError": "Bitte einen gültigen YouTube-Link angeben.","shareVideoTitle": "Video teilen",- "shareYourScreen": "Bildschirm freigeben",+ "shareYourScreen": "Bildschirmfreigabe ein-/ausschalten","shareYourScreenDisabled": "Bildschirmfreigabe deaktiviert.","startLiveStreaming": "Livestream starten","startRecording": "Aufnahme starten",@@ -320,7 +327,9 @@"WaitForHostMsgWOk": "Die Konferenz <b>{{room}}</b> wurde noch nicht gestartet. Falls Sie die Konferenz leiten, authentifizieren Sie sich bitte. Warten Sie andernfalls, bis die Konferenz gestartet wird.","WaitingForHostTitle": "Warten auf den Beginn der Konferenz …","Yes": "Ja",- "yourEntireScreen": "Ganzer Bildschirm"+ "yourEntireScreen": "Ganzer Bildschirm",+ "remoteUserControls": "Remote Benutzersteuerung von {{username}}",+ "localUserControls": "Lokale Benutzersteuerung"},"dialOut": {"statusMessage": "ist jetzt {{status}}"@@ -340,8 +349,20 @@"slightBlur": "Hintergrund leicht unscharf","removeBackground": "Hintergrund entfernen","uploadImage": "Bild hochladen",+ "addBackground": "Hintergrund hinzufügen","pleaseWait": "Bitte warten...",- "none": "keiner"+ "none": "keiner",+ "uploadedImage": "Hochgeladenes Bild {{index}}",+ "deleteImage": "Bild löschen",+ "image1" : "Strand",+ "image2" : "Weiße neutrale Wand",+ "image3" : "Weißer leerer Raum",+ "image4" : "Schwarze Stehlampe",+ "image5" : "Berg",+ "image6" : "Wald",+ "image7" : "Sonnenaufgang",+ "desktopShareError": "Desktop konnte nicht freigegeben werden",+ "desktopShare":"Desktopfreigabe"},"feedback": {"average": "Durchschnittlich",@@ -350,7 +371,8 @@"good": "Gut","rateExperience": "Bitte bewerten Sie diese Konferenz","veryBad": "Sehr schlecht",- "veryGood": "Sehr gut"+ "veryGood": "Sehr gut",+ "star": "Sterne"},"incomingCall": {"answer": "Antworten",@@ -367,6 +389,7 @@"country": "Land","dialANumber": "Um am Meeting teilzunehmen, müssen Sie eine dieser Nummern wählen und dann die PIN eingeben.","dialInConferenceID": "PIN:",+ "copyNumber":"Nummer kopieren","dialInNotSupported": "Entschuldigung, leider wird das Einwählen derzeit nicht unterstützt.","dialInNumber": "Einwählen:","dialInSummaryError": "Fehler beim Abrufen der Einwahlinformationen. Versuchen Sie es später erneut.",@@ -404,6 +427,7 @@"support": "Support","supportMsg": "Wenn der Fehler erneut auftritt, bitte kontaktieren Sie"},+ "jitsiHome": "{{logo}} Logo, verlinkt zur Homepage","keyboardShortcuts": {"focusLocal": "Lokales Video fokussieren","focusRemote": "Auf das Video einer anderen Person fokussieren",@@ -524,7 +548,19 @@"OldElectronAPPTitle": "Sicherheitslücke!","oldElectronClientDescription1": "Sie scheinen eine alte Version des Jitsi-Meet-Clients zu nutzen. Diese hat bekannte Schwachstellen. Bitte aktualisieren Sie auf unsere ","oldElectronClientDescription2": "aktuelle Version",- "oldElectronClientDescription3": "!"+ "oldElectronClientDescription3": "!",+ "groupTitle": "Benachrichtigungen"+ },+ "participantsPane": {+ "close": "Schließen",+ "headings": {+ "lobby": "Lobby ({{count}})",+ "participantsList": "Teilnehmer ({{count}})"+ },+ "actions": {+ "muteAll": "Alle stummschalten",+ "stopVideo": "Video stoppen"+ }},"participantsPane": {"headings": {@@ -589,6 +625,7 @@"linkCopied": "Link in die Zwischenablage kopiert","lookGood": "Ihr Mikrofon scheint zu funktionieren.","or": "oder",+ "keyboardShortcuts" : "Tastaturkurzbefehle aktivieren","premeeting": "Vorschau","showScreen": "Konferenzvorschau aktivieren","startWithPhone": "Mit Telefonaudio starten",@@ -612,6 +649,7 @@"ringing": "Es klingelt …"},"profile": {+ "avatar": "Benutzerbild","setDisplayNameLabel": "Anzeigename festlegen","setEmailInput": "E-Mail eingeben","setEmailLabel": "E-Mail-Adresse für Gravatar",@@ -728,29 +766,29 @@"title": "Die Konferenz wurde unterbrochen, weil der Standby-Modus aktiviert wurde."},"toolbar": {- "accessibilityLabel": {+ "accessibilityLabel": {"audioOnly": "„Nur Audio“ ein-/ausschalten","audioRoute": "Audiogerät auswählen","callQuality": "Qualitätseinstellungen","cc": "Untertitel ein-/ausschalten",- "chat": "Chatfenster ein-/ausblenden",+ "chat": "Chatfenster öffnen / schließen","document": "Geteiltes Dokument schließen","download": "Unsere Apps herunterladen","embedMeeting": "Konferenz einbetten","feedback": "Feedback hinterlassen","fullScreen": "Vollbildmodus ein-/ausschalten","grantModerator": "Moderationsrechte vergeben",- "hangup": "Anruf beenden",+ "hangup": "Konferenz verlassen","help": "Hilfe","invite": "Person einladen","kick": "Person entfernen","lobbyButton": "Lobbymodus ein-/ausschalten","localRecording": "Lokale Aufzeichnungssteuerelemente ein-/ausschalten","lockRoom": "Konferenzpasswort ein-/ausschalten",- "moreActions": "Menü „Weitere Aktionen“ ein-/ausschalten",- "moreActionsMenu": "Menü „Weitere Aktionen“",+ "moreActions": "Menü „Weitere Einstellungen“ ein-/ausschalten",+ "moreActionsMenu": "Menü „Weitere Einstellungen“","moreOptions": "Menü „Weitere Optionen“",- "mute": "„Audio stummschalten“ ein-/ausschalten",+ "mute": "Mikrofon aktivieren / deaktivieren","muteEveryone": "Alle stummschalten","muteEveryoneElse": "Alle anderen stummschalten","muteEveryonesVideo": "Alle Kameras ausschalten",@@ -759,7 +797,7 @@"pip": "Bild-in-Bild-Modus ein-/ausschalten","privateMessage": "Private Nachricht senden","profile": "Profil bearbeiten",- "raiseHand": "„Melden“ ein-/ausschalten",+ "raiseHand": "Hand erheben / senken","recording": "Aufzeichnung ein-/ausschalten","remoteMute": "Personen stummschalten","remoteVideoMute": "Kamera von dieser Person ausschalten",@@ -776,7 +814,9 @@"toggleCamera": "Kamera wechseln","toggleFilmstrip": "Miniaturansichten ein-/ausschalten","videomute": "„Video stummschalten“ ein-/ausschalten",- "selectBackground": "Hintergrund auswählen"+ "selectBackground": "Hintergrund auswählen",+ "expand": "Ausklappen",+ "collapse": "Einklappen"},"addPeople": "Personen zur Konferenz hinzufügen","audioSettings": "Ton-Einstellungen",@@ -797,7 +837,7 @@"exitFullScreen": "Vollbildmodus verlassen","exitTileView": "Kachelansicht ausschalten","feedback": "Feedback hinterlassen",- "hangup": "Verlassen",+ "hangup": "Konferenz verlassen","help": "Hilfe","invite": "Personen einladen","lobbyButtonDisable": "Lobbymodus deaktivieren",@@ -807,7 +847,7 @@"lowerYourHand": "Hand senken","moreActions": "Weitere Einstellungen","moreOptions": "Weitere Optionen",- "mute": "Stummschaltung aktivieren / deaktivieren",+ "mute": "Mikrofon aktivieren / deaktivieren","muteEveryone": "Alle stummschalten","muteEveryonesVideo": "Alle Kameras ausschalten","noAudioSignalTitle": "Es kommt kein Input von Ihrem Mikrofon!",@@ -822,7 +862,7 @@"pip": "Bild-in-Bild-Modus einschalten","privateMessage": "Private Nachricht senden","profile": "Profil bearbeiten",- "raiseHand": "Hand erheben",+ "raiseHand": "Hand erheben / senken","raiseYourHand": "Melden","security": "Sicherheitsoptionen","Settings": "Einstellungen",@@ -867,6 +907,7 @@"react-nativeGrantPermissions": "Wählen Sie <b><i>Erlauben</i></b>, wenn der Browser um Berechtigungen bittet.","safariGrantPermissions": "Wählen Sie <b><i>OK</i></b>, wenn der Browser um Berechtigungen bittet."},+ "volumeSlider": "Lautstärkeregler","videoSIPGW": {"busy": "Es stehen keine freien Ressourcen zur Verfügung. Bitte versuchen Sie es später noch einmal.","busyTitle": "Keine freien Ressourcen",@@ -911,6 +952,7 @@"videomute": "Person hat die Kamera angehalten"},"welcomepage": {+ "addMeetingName": "Besprechungsnamen hinzufügen","accessibilityLabel": {"join": "Zum Teilnehmen tippen","roomname": "Konferenzname eingeben"@@ -933,6 +975,9 @@"join": "ERSTELLEN / BEITRETEN","jitsiOnMobile": "Jitsi unterwegs – einfach unsere Apps herunterladen und Meetings von überall starten","moderatedMessage": "Oder <a href=\"{{url}}\" rel=\"noopener noreferrer\" target=\"_blank\">reservieren Sie sich eine Konferenz-URL</a>, die nur Sie moderieren.",+ "mobileDownLoadLinkIos": "iOS App Download",+ "mobileDownLoadLinkAndroid": "Android App Download",+ "mobileDownLoadLinkFDroid": "F-Droid App Download","privacy": "Datenschutz","recentList": "Verlauf","recentListDelete": "Eintrag löschen",@@ -944,7 +989,15 @@"sendFeedback": "Feedback senden","startMeeting": "Meeting starten","terms": "AGB",- "title": "Sichere, voll funktionale und komplett kostenlose Videokonferenzen"+ "title": "Sichere, voll funktionale und komplett kostenlose Videokonferenzen",+ "logo":{+ "calendar":"Kalender Logo",+ "microsoftLogo":"Microsoft Logo",+ "logoDeepLinking":"Jitsi Meet Logo",+ "desktopPreviewThumbnail":"Desktop-Vorschau Thumbnail",+ "googleLogo":"Google Logo",+ "policyLogo":"Richtlinienlogo"+ }},"lonelyMeetingExperience": {"button": "Andere einladen",diff --git a/lang/main.json b/lang/main.jsonindex 9d4053d79c..a8c03034fe 100644--- a/lang/main.json+++ b/lang/main.json@@ -70,12 +70,17 @@},"privateNotice": "Private message to {{recipient}}","title": "Chat",- "you": "you"+ "you": "you",+ "message": "Message",+ "messageAccessibleTitle": "{{user}} says:",+ "messageAccessibleTitleMe": "me says:",+ "smileysPanel": "Emoji panel"},"chromeExtensionBanner": {"installExtensionText": "Install the extension for Google Calendar and Office 365 integration","buttonText": "Install Chrome Extension",- "dontShowAgain": "Don’t show me this again"+ "dontShowAgain": "Don’t show me this again",+ "close": "Close"},"connectingOverlay": {"joiningRoom": "Connecting you to your meeting..."@@ -204,6 +209,8 @@"e2eeLabel": "Enable End-to-End Encryption","e2eeWarning": "WARNING: Not all participants in this meeting seem to have support for End-to-End encryption. If you enable it they won't be able to see nor hear you.","enterDisplayName": "Please enter your name here",+ "enterDisplayNameToJoin": "Please enter your name to join",+ "embedMeeting": "Embed meeting","error": "Error","gracefulShutdown": "Our service is currently down for maintenance. Please try again later.","grantModeratorDialog": "Are you sure you want to make this participant a moderator?",@@ -320,7 +327,9 @@"WaitForHostMsgWOk": "The conference <b>{{room}}</b> has not yet started. If you are the host then please press Ok to authenticate. Otherwise, please wait for the host to arrive.","WaitingForHostTitle": "Waiting for the host ...","Yes": "Yes",- "yourEntireScreen": "Your entire screen"+ "yourEntireScreen": "Your entire screen",+ "remoteUserControls": "Remote user controls of {{username}}",+ "localUserControls": "Local user controls"},"dialOut": {"statusMessage": "is now {{status}}"@@ -341,8 +350,19 @@"slightBlur": "Slight Blur","removeBackground": "Remove background","addBackground": "Add background",+ "pleaseWait": "Please wait...","none": "None",- "desktopShareError": "Could not create desktop share"+ "uploadedImage": "Uploaded image {{index}}",+ "deleteImage": "Delete image",+ "image1" : "Beach",+ "image2" : "White neutral wall",+ "image3" : "White empty room",+ "image4" : "Black floor lamp",+ "image5" : "Mountain",+ "image6" : "Forest ",+ "image7" : "Sunrise",+ "desktopShareError": "Could not create desktop share",+ "desktopShare":"Desktop share"},"feedback": {"average": "Average",@@ -351,7 +371,8 @@"good": "Good","rateExperience": "Rate your meeting experience","veryBad": "Very Bad",- "veryGood": "Very Good"+ "veryGood": "Very Good",+ "star": "Star"},"incomingCall": {"answer": "Answer",@@ -368,6 +389,7 @@"country": "Country","dialANumber": "To join your meeting, dial one of these numbers and then enter the pin.","dialInConferenceID": "PIN:",+ "copyNumber":"Copy number","dialInNotSupported": "Sorry, dialing in is currently not supported.","dialInNumber": "Dial-in:","dialInSummaryError": "Error fetching dial-in info now. Please try again later.",@@ -405,6 +427,7 @@"support": "Support","supportMsg": "If this keeps happening, reach out to"},+ "jitsiHome": "{{logo}} Logo, links to Homepage","keyboardShortcuts": {"focusLocal": "Focus on your video","focusRemote": "Focus on another person's video",@@ -525,9 +548,11 @@"OldElectronAPPTitle": "Security vulnerability!","oldElectronClientDescription1": "You appear to be using an old version of the Jitsi Meet client which has known security vulnerabilities. Please make sure you update to our ","oldElectronClientDescription2": "latest build",- "oldElectronClientDescription3": " now!"+ "oldElectronClientDescription3": " now!",+ "groupTitle": "Notifications"},"participantsPane": {+ "close": "Close","headings": {"lobby": "Lobby ({{count}})","participantsList": "Meeting participants ({{count}})"@@ -592,6 +617,7 @@"or": "or","premeeting": "Pre meeting","showScreen": "Enable pre meeting screen",+ "keyboardShortcuts" : "Enable Keyboard shortcuts","startWithPhone": "Start with phone audio","screenSharingError": "Screen sharing error:","videoOnlyError": "Video error:",@@ -613,6 +639,7 @@"ringing": "Ringing..."},"profile": {+ "avatar": "avatar","setDisplayNameLabel": "Set your display name","setEmailInput": "Enter e-mail","setEmailLabel": "Set your gravatar email",@@ -735,24 +762,24 @@"audioRoute": "Select the sound device","callQuality": "Manage video quality","cc": "Toggle subtitles",- "chat": "Toggle chat window",+ "chat": "Open / Close chat","document": "Toggle shared document","download": "Download our apps","embedMeeting": "Embed meeting","feedback": "Leave feedback","fullScreen": "Toggle full screen","grantModerator": "Grant Moderator",- "hangup": "Leave the call",+ "hangup": "Leave the meeting","help": "Help","invite": "Invite people","kick": "Kick participant","lobbyButton": "Enable/disable lobby mode","localRecording": "Toggle local recording controls","lockRoom": "Toggle meeting password",- "moreActions": "Toggle more actions menu",+ "moreActions": "More actions","moreActionsMenu": "More actions menu","moreOptions": "Show more options",- "mute": "Toggle mute audio",+ "mute": "Mute / Unmute","muteEveryone": "Mute everyone","muteEveryoneElse": "Mute everyone else","muteEveryonesVideo": "Disable everyone's camera",@@ -761,7 +788,7 @@"pip": "Toggle Picture-in-Picture mode","privateMessage": "Send private message","profile": "Edit your profile",- "raiseHand": "Toggle raise hand",+ "raiseHand": "Raise / Lower your hand","recording": "Toggle recording","remoteMute": "Mute participant","remoteVideoMute": "Disable camera of participant",@@ -770,18 +797,22 @@"shareaudio": "Share audio","sharedvideo": "Toggle YouTube video sharing","shareRoom": "Invite someone",- "shareYourScreen": "Toggle screenshare",+ "shareYourScreen": "Start / Stop sharing your screen","shortcuts": "Toggle shortcuts","show": "Show on stage","speakerStats": "Toggle speaker statistics","tileView": "Toggle tile view","toggleCamera": "Toggle camera","toggleFilmstrip": "Toggle filmstrip",- "videomute": "Toggle mute video",- "selectBackground": "Select Background"+ "videomute": "Start / Stop camera",+ "videoblur": "Toggle video blur",+ "selectBackground": "Select Background",+ "expand": "Expand",+ "collapse": "Collapse"},"addPeople": "Add people to your call","audioSettings": "Audio settings",+ "videoSettings": "Video settings","audioOnlyOff": "Disable low bandwidth mode","audioOnlyOn": "Enable low bandwidth mode","audioRoute": "Select the sound device",@@ -799,7 +830,7 @@"exitFullScreen": "Exit full screen","exitTileView": "Exit tile view","feedback": "Leave feedback",- "hangup": "Leave",+ "hangup": "Leave the meeting","help": "Help","invite": "Invite people","lobbyButtonDisable": "Disable lobby mode",@@ -842,7 +873,6 @@"tileViewToggle": "Toggle tile view","toggleCamera": "Toggle camera","videomute": "Start / Stop camera",- "videoSettings": "Video settings","selectBackground": "Select background"},"transcribing": {@@ -869,6 +899,7 @@"react-nativeGrantPermissions": "Select <b><i>Allow</i></b> when your browser asks for permissions.","safariGrantPermissions": "Select <b><i>OK</i></b> when your browser asks for permissions."},+ "volumeSlider": "Volume slider","videoSIPGW": {"busy": "We're working on freeing resources. Please try again in a few minutes.","busyTitle": "The Room service is currently busy",@@ -913,6 +944,7 @@"videomute": "Participant has stopped the camera"},"welcomepage": {+ "addMeetingName": "Add Meeting name","accessibilityLabel": {"join": "Tap to join","roomname": "Enter room name"@@ -934,6 +966,9 @@"info": "Dial-in info","join": "CREATE / JOIN","jitsiOnMobile": "Jitsi on mobile – download our apps and start a meeting from anywhere",+ "mobileDownLoadLinkIos": "Download mobile app for iOS",+ "mobileDownLoadLinkAndroid": "Download mobile app for Android",+ "mobileDownLoadLinkFDroid": "Download mobile app for F-Droid","moderatedMessage": "Or <a href=\"{{url}}\" rel=\"noopener noreferrer\" target=\"_blank\">book a meeting URL</a> in advance where you are the only moderator.","privacy": "Privacy","recentList": "Recent",@@ -946,7 +981,15 @@"sendFeedback": "Send feedback","startMeeting": "Start meeting","terms": "Terms",- "title": "Secure, fully featured, and completely free video conferencing"+ "title": "Secure, fully featured, and completely free video conferencing",+ "logo":{+ "calendar":"Calendar logo",+ "microsoftLogo":"Microsoft logo",+ "logoDeepLinking":"Jitsi meet logo",+ "desktopPreviewThumbnail":"Desktop preview thumbnail",+ "googleLogo":"Google Logo",+ "policyLogo":"Policy logo"+ }},"lonelyMeetingExperience": {"button": "Invite others",diff --git a/modules/keyboardshortcut/keyboardshortcut.js b/modules/keyboardshortcut/keyboardshortcut.jsindex f0ec6518bc..aba8dc4289 100644--- a/modules/keyboardshortcut/keyboardshortcut.js+++ b/modules/keyboardshortcut/keyboardshortcut.js@@ -1,5 +1,5 @@-/* global APP, $ */-+/* global APP */+import { jitsiLocalStorage } from '@jitsi/js-utils';import Logger from 'jitsi-meet-logger';import {@@ -30,44 +30,66 @@ const _shortcuts = new Map();const _shortcutsHelp = new Map();/**- * True if the keyboard shortcuts are enabled and false if not.- * @type {boolean}+ * The key used to save in local storage if keyboard shortcuts are enabled.+ */+const _enableShortcutsKey = 'enableShortcuts';++/**+ * Prefer keyboard handling of these elements over global shortcuts.+ * If a button is triggered using the Spacebar it should not trigger PTT.+ * If an input element is focused and M is pressed it should not mute audio.+ */+const _elementsBlacklist = [+ 'input',+ 'textarea',+ 'button',+ '[role=button]',+ '[role=menuitem]',+ '[role=radio]',+ '[role=tab]',+ '[role=option]',+ '[role=switch]',+ '[role=range]',+ '[role=log]'+];++/**+ * An element selector for elements that have their own keyboard handling.*/-let enabled = true;+const _focusedElementsSelector = `:focus:is(${_elementsBlacklist.join(',')})`;/*** Maps keycode to character, id of popover for given function and function.*/const KeyboardShortcut = {+ isPushToTalkActive: false,+init() {this._initGlobalShortcuts();window.onkeyup = e => {- if (!enabled) {+ if (!this.getEnabled()) {return;}const key = this._getKeyboardKey(e).toUpperCase();const num = parseInt(key, 10);- if (!($(':focus').is('input[type=text]')- || $(':focus').is('input[type=password]')- || $(':focus').is('textarea'))) {+ if (!document.querySelector(_focusedElementsSelector)) {if (_shortcuts.has(key)) {_shortcuts.get(key).function(e);} else if (!isNaN(num) && num >= 0 && num <= 9) {APP.store.dispatch(clickOnVideo(num));}-}};window.onkeydown = e => {- if (!enabled) {+ if (!this.getEnabled()) {return;}- if (!($(':focus').is('input[type=text]')- || $(':focus').is('input[type=password]')- || $(':focus').is('textarea'))) {+ const focusedElement = document.querySelector(_focusedElementsSelector);++ if (!focusedElement) {if (this._getKeyboardKey(e).toUpperCase() === ' ') {if (APP.conference.isLocalAudioMuted()) {sendAnalytics(createShortcutEvent(@@ -75,8 +97,14 @@ const KeyboardShortcut = {PRESSED));logger.log('Talk shortcut pressed');APP.conference.muteAudio(false);+ this.isPushToTalkActive = true;}}+ } else if (this._getKeyboardKey(e).toUpperCase() === 'ESCAPE') {+ // Allow to remove focus from selected elements using ESC key.+ if (focusedElement && focusedElement.blur) {+ focusedElement.blur();+ }}};},@@ -86,7 +114,13 @@ const KeyboardShortcut = {* @param {boolean} value - the new value.*/enable(value) {- enabled = value;+ jitsiLocalStorage.setItem(_enableShortcutsKey, value);+ },++ getEnabled() {+ // Should be enabled if not explicitly set to false+ // eslint-disable-next-line no-unneeded-ternary+ return jitsiLocalStorage.getItem(_enableShortcutsKey) === 'false' ? false : true;},/**@@ -198,9 +232,12 @@ const KeyboardShortcut = {// register SPACE shortcut in two steps to insure visibility of help// messagethis.registerShortcut(' ', null, () => {- sendAnalytics(createShortcutEvent('push.to.talk', RELEASED));- logger.log('Talk shortcut released');- APP.conference.muteAudio(true);+ if (this.isPushToTalkActive) {+ sendAnalytics(createShortcutEvent('push.to.talk', RELEASED));+ logger.log('Talk shortcut released');+ APP.conference.muteAudio(true);+ this.isPushToTalkActive = false;+ }});this._addShortcutToHelp('SPACE', 'keyboardShortcuts.pushToTalk');diff --git a/modules/translation/translation.js b/modules/translation/translation.jsindex 1ad2a3e6ca..d7f48e5b96 100644--- a/modules/translation/translation.js+++ b/modules/translation/translation.js@@ -1,4 +1,4 @@-/* @flow */+/* @flow */import jqueryI18next from 'jquery-i18next';@@ -6,6 +6,10 @@ import { i18next } from '../../react/features/base/i18n';declare var $: Function;+type DocumentElement = {+ lang: string+}+/*** Notifies that the {@link i18next} instance has finished its initialization.*@@ -13,7 +17,12 @@ declare var $: Function;* @private*/function _onI18nInitialized() {++ const documentElement: DocumentElement+ = document.documentElement || {};+$('[data-i18n]').localize();+ documentElement.lang = i18next.language;}/**diff --git a/package-lock.json b/package-lock.jsonindex 252c01dbed..464d50886e 100644--- a/package-lock.json+++ b/package-lock.json@@ -15262,12 +15262,23 @@}},"react-textarea-autosize": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-7.1.0.tgz",- "integrity": "sha512-c2FlR/fP0qbxmlrW96SdrbgP/v0XZMTupqB90zybvmDVDutytUgPl7beU35klwcTeMepUIQEpQUn3P3bdshGPg==",+ "version": "8.3.0",+ "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.3.0.tgz",+ "integrity": "sha512-3GLWFAan2pbwBeoeNDoqGmSbrShORtgWfaWX0RJDivsUrpShh01saRM5RU/i4Zmf+whpBVEY5cA90Eq8Ub1N3w==","requires": {- "@babel/runtime": "^7.1.2",- "prop-types": "^15.6.0"+ "@babel/runtime": "^7.10.2",+ "use-composed-ref": "^1.0.0",+ "use-latest": "^1.0.0"+ },+ "dependencies": {+ "@babel/runtime": {+ "version": "7.12.5",+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz",+ "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",+ "requires": {+ "regenerator-runtime": "^0.13.4"+ }+ }}},"react-transition-group": {@@ -17690,6 +17701,11 @@"integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==","dev": true},+ "ts-essentials": {+ "version": "2.0.12",+ "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-2.0.12.tgz",+ "integrity": "sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w=="+ },"tslib": {"version": "1.9.3","resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",@@ -17975,6 +17991,27 @@"resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.2.5.tgz","integrity": "sha512-gN3vgMISAgacF7sqsLPByqoePooY3n2emTH59Ur5d/M8eg4WTWu1xp8i8DHjohftIyEx0S08RiYxbffr4j8Peg=="},+ "use-composed-ref": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.1.0.tgz",+ "integrity": "sha512-my1lNHGWsSDAhhVAT4MKs6IjBUtG6ZG11uUqexPH9PptiIZDQOzaF4f5tEbJ2+7qvNbtXNBbU3SfmN+fXlWDhg==",+ "requires": {+ "ts-essentials": "^2.0.3"+ }+ },+ "use-isomorphic-layout-effect": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.1.tgz",+ "integrity": "sha512-L7Evj8FGcwo/wpbv/qvSfrkHFtOpCzvM5yl2KVyDJoylVuSvzphiiasmjgQPttIGBAy2WKiBNR98q8w7PiNgKQ=="+ },+ "use-latest": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/use-latest/-/use-latest-1.2.0.tgz",+ "integrity": "sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw==",+ "requires": {+ "use-isomorphic-layout-effect": "^1.0.0"+ }+ },"use-memo-one": {"version": "1.1.2","resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.2.tgz",diff --git a/package.json b/package.jsonindex 329a76ace0..c7fd6366f4 100644--- a/package.json+++ b/package.json@@ -91,7 +91,7 @@"react-native-webview": "11.0.2","react-native-youtube-iframe": "1.2.3","react-redux": "7.1.0",- "react-textarea-autosize": "7.1.0",+ "react-textarea-autosize": "8.3.0","react-transition-group": "2.4.0","react-youtube": "7.13.1","redux": "4.0.4",diff --git a/react/features/base/avatar/components/web/StatelessAvatar.js b/react/features/base/avatar/components/web/StatelessAvatar.jsindex 394a7b42e5..476a9bf62b 100644--- a/react/features/base/avatar/components/web/StatelessAvatar.js+++ b/react/features/base/avatar/components/web/StatelessAvatar.js@@ -2,6 +2,7 @@import React from 'react';+import { translate } from '../../../../base/i18n';import { Icon } from '../../../icons';import AbstractStatelessAvatar, { type Props as AbstractProps } from '../AbstractStatelessAvatar';@@ -30,14 +31,19 @@ type Props = AbstractProps & {/*** TestId of the element, if any.*/- testId?: string+ testId?: string,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/*** Implements a stateless avatar component that renders an avatar purely from what gets passed through* props.*/-export default class StatelessAvatar extends AbstractStatelessAvatar<Props> {+class StatelessAvatar extends AbstractStatelessAvatar<Props> {/*** Implements {@code Component#render}.*@@ -64,6 +70,7 @@ export default class StatelessAvatar extends AbstractStatelessAvatar<Props> {return (<div className = { this._getBadgeClassName() }><img+ alt = { this.props.t('profile.avatar') }className = { this._getAvatarClassName() }data-testid = { this.props.testId }id = { this.props.id }@@ -88,7 +95,7 @@ export default class StatelessAvatar extends AbstractStatelessAvatar<Props> {xmlnsXlink = 'http://www.w3.org/1999/xlink'><textdominantBaseline = 'central'- fill = 'rgba(255,255,255,.6)'+ fill = 'rgba(255,255,255,1)'fontSize = '40pt'textAnchor = 'middle'x = '50'@@ -104,6 +111,7 @@ export default class StatelessAvatar extends AbstractStatelessAvatar<Props> {return (<div className = { this._getBadgeClassName() }><img+ alt = { this.props.t('profile.avatar') }className = { this._getAvatarClassName('defaultAvatar') }data-testid = { this.props.testId }id = { this.props.id }@@ -157,3 +165,5 @@ export default class StatelessAvatar extends AbstractStatelessAvatar<Props> {_isIcon: (?string | ?Object) => boolean}++export default translate(StatelessAvatar);diff --git a/react/features/base/buttons/CopyButton.js b/react/features/base/buttons/CopyButton.jsindex 52117077db..c81e2a5406 100644--- a/react/features/base/buttons/CopyButton.js+++ b/react/features/base/buttons/CopyButton.js@@ -3,7 +3,6 @@import React, { useState } from 'react';import { Icon, IconCheck, IconCopy } from '../../base/icons';-import { translate } from '../i18n';import { copyText } from '../util';@@ -32,7 +31,12 @@ type Props = {/*** The text displayed on copy success*/- textOnCopySuccess: string+ textOnCopySuccess: string,++ /**+ * The id of the button+ */+ id?: string,};/**@@ -40,7 +44,7 @@ type Props = {** @returns {React$Element<any>}*/-function CopyButton({ className, displayedText, textToCopy, textOnHover, textOnCopySuccess }: Props) {+function CopyButton({ className, displayedText, textToCopy, textOnHover, textOnCopySuccess, id }: Props) {const [ isClicked, setIsClicked ] = useState(false);const [ isHovered, setIsHovered ] = useState(false);@@ -83,6 +87,20 @@ function CopyButton({ className, displayedText, textToCopy, textOnHover, textOnCsetIsHovered(false);}+ /**+ * KeyPress handler for accessibility.+ *+ * @param {React.KeyboardEventHandler<HTMLDivElement>} e - The key event to handle.+ *+ * @returns {void}+ */+ function onKeyPress(e) {+ if (onClick && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ onClick();+ }+ }+/*** Renders the content of the link based on the state.*@@ -93,7 +111,7 @@ function CopyButton({ className, displayedText, textToCopy, textOnHover, textOnCreturn (<><div className = 'copy-button-content selected'>- {textOnCopySuccess}+ <span role = { 'alert' }>{ textOnCopySuccess }</span></div><Icon src = { IconCheck } /></>@@ -112,10 +130,17 @@ function CopyButton({ className, displayedText, textToCopy, textOnHover, textOnCreturn (<div+ aria-label = { textOnHover }className = { `${className} copy-button${isClicked ? ' clicked' : ''}` }+ id = { id }+ onBlur = { onHoverOut }onClick = { onClick }+ onFocus = { onHoverIn }+ onKeyPress = { onKeyPress }onMouseOut = { onHoverOut }- onMouseOver = { onHoverIn }>+ onMouseOver = { onHoverIn }+ role = 'button'+ tabIndex = { 0 }>{ renderContent() }</div>);@@ -125,4 +150,4 @@ CopyButton.defaultProps = {className: ''};-export default translate(CopyButton);+export default CopyButton;diff --git a/react/features/base/dialog/components/web/ModalHeader.js b/react/features/base/dialog/components/web/ModalHeader.jsindex 9c818f07d7..a8e9a60864 100644--- a/react/features/base/dialog/components/web/ModalHeader.js+++ b/react/features/base/dialog/components/web/ModalHeader.js@@ -10,6 +10,7 @@ import {} from '@atlaskit/modal-dialog/dist/es2019/styled/Content';import React from 'react';+import { translate } from '../../../i18n';import { Icon, IconClose } from '../../../icons';const TitleIcon = ({ appearance }: { appearance?: 'danger' | 'warning' }) => {@@ -45,11 +46,40 @@ type Props = {* @class ModalHeader* @extends {React.Component<Props>}*/-export default class ModalHeader extends React.Component<Props> {+class ModalHeader extends React.Component<Props> {static defaultProps = {isHeadingMultiline: true};+ /**+ * Initializes a new {@code ModalHeader} instance.+ *+ * @param {*} props - The read-only properties with which the new instance+ * is to be initialized.+ */+ constructor(props) {+ super(props);++ // Bind event handler so it is only bound once for every instance.+ this._onKeyPress = this._onKeyPress.bind(this);+ }++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (this.props.onClose && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ this.props.onClose();+ }+ }+/*** Implements React's {@link Component#render()}.*@@ -65,7 +95,8 @@ export default class ModalHeader extends React.Component<Props> {onClose,showKeyline,isHeadingMultiline,- testId+ testId,+ t} = this.props;if (!heading) {@@ -83,12 +114,18 @@ export default class ModalHeader extends React.Component<Props> {{heading}</TitleText></Title>+{!hideCloseIconButton && <Icon+ ariaLabel = { t('dialog.close') }onClick = { onClose }- src = { IconClose } />+ onKeyPress = { this._onKeyPress }+ role = 'button'+ src = { IconClose }+ tabIndex = { 0 } />}</Header>);}}+export default translate(ModalHeader);diff --git a/react/features/base/dialog/components/web/StatelessDialog.js b/react/features/base/dialog/components/web/StatelessDialog.jsindex efa2e5645c..ed4bc7f4c9 100644--- a/react/features/base/dialog/components/web/StatelessDialog.js+++ b/react/features/base/dialog/components/web/StatelessDialog.js@@ -118,7 +118,7 @@ class StatelessDialog extends Component<Props> {// Bind event handlers so they are only bound once for every instance.this._onCancel = this._onCancel.bind(this);this._onDialogDismissed = this._onDialogDismissed.bind(this);- this._onKeyDown = this._onKeyDown.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);this._onSubmit = this._onSubmit.bind(this);this._renderFooter = this._renderFooter.bind(this);this._setDialogElement = this._setDialogElement.bind(this);@@ -159,7 +159,7 @@ class StatelessDialog extends Component<Props> {shouldCloseOnEscapePress = { true }width = { width || 'medium' }><div- onKeyDown = { this._onKeyDown }+ onKeyPress = { this._onKeyPress }ref = { this._setDialogElement }><formclassName = 'modal-dialog-form'@@ -327,7 +327,7 @@ class StatelessDialog extends Component<Props> {this._dialogElement = element;}- _onKeyDown: (Object) => void;+ _onKeyPress: (Object) => void;/*** Handles 'Enter' key in the dialog to submit/hide dialog depending on@@ -337,7 +337,7 @@ class StatelessDialog extends Component<Props> {* @private* @returns {void}*/- _onKeyDown(event) {+ _onKeyPress(event) {// If the event coming to the dialog has been subject to preventDefault// we don't handle it here.if (event.defaultPrevented) {diff --git a/react/features/base/environment/utils.js b/react/features/base/environment/utils.jsindex 0b786799dd..5258675913 100644--- a/react/features/base/environment/utils.js+++ b/react/features/base/environment/utils.js@@ -33,6 +33,7 @@ export function checkChromeExtensionsInstalled(config: Object = {}) {const img = new Image();img.src = `chrome-extension://${info.id}/${info.path}`;+ img.setAttribute('aria-hidden', 'true');img.onload = function() {resolve(true);};diff --git a/react/features/base/icons/components/Icon.js b/react/features/base/icons/components/Icon.jsindex dde0accb07..42fb9ce4a9 100644--- a/react/features/base/icons/components/Icon.js+++ b/react/features/base/icons/components/Icon.js@@ -1,6 +1,6 @@// @flow-import React from 'react';+import React, { useCallback } from 'react';import { Container } from '../../react/base';import { styleTypeToObject } from '../../styles';@@ -10,7 +10,7 @@ type Props = {/*** Class name for the web platform, if any.*/- className: string,+ className?: string,/*** Color of the icon (if not provided by the style object).@@ -22,6 +22,11 @@ type Props = {*/id?: string,+ /**+ * Id of the icon container+ */+ containerId?: string,+/*** Function to invoke on click.*/@@ -40,8 +45,63 @@ type Props = {/*** Style object to be applied.*/- style?: Object-};+ style?: Object,++ /**+ * aria disabled flag for the Icon.+ */+ ariaDisabled?: boolean,++ /**+ * aria label for the Icon.+ */+ ariaLabel?: string,++ /**+ * whether the element has a popup+ */+ ariaHasPopup?: boolean,++ /**+ * whether the element has a pressed+ */+ ariaPressed?: boolean,++ /**+ * id of description label+ */+ ariaDescribedBy?: string,++ /**+ * whether the element popup is expanded+ */+ ariaExpanded?: boolean,++ /**+ * The id of the element this button icon controls+ */+ ariaControls?: string,++ /**+ * tabIndex for the Icon.+ */+ tabIndex?: number,++ /**+ * role for the Icon.+ */+ role?: string,++ /**+ * keypress handler.+ */+ onKeyPress?: Function,++ /**+ * keydown handler.+ */+ onKeyDown?: Function+}export const DEFAULT_COLOR = navigator.product === 'ReactNative' ? 'white' : undefined;export const DEFAULT_SIZE = navigator.product === 'ReactNative' ? 36 : 22;@@ -57,11 +117,24 @@ export default function Icon(props: Props) {className,color,id,+ containerId,onClick,size,src: IconComponent,- style- } = props;+ style,+ ariaHasPopup,+ ariaLabel,+ ariaDisabled,+ ariaExpanded,+ ariaControls,+ tabIndex,+ ariaPressed,+ ariaDescribedBy,+ role,+ onKeyPress,+ onKeyDown,+ ...rest+ }: Props = props;const {color: styleColor,@@ -71,11 +144,33 @@ export default function Icon(props: Props) {const calculatedColor = color ?? styleColor ?? DEFAULT_COLOR;const calculatedSize = size ?? styleSize ?? DEFAULT_SIZE;+ const onKeyPressHandler = useCallback(e => {+ if ((e.key === 'Enter' || e.key === ' ') && onClick) {+ e.preventDefault();+ onClick(e);+ } else if (onKeyPress) {+ onKeyPress(e);+ }+ }, [ onClick, onKeyPress ]);+return (<Container- className = { `jitsi-icon ${className}` }+ { ...rest }+ aria-controls = { ariaControls }+ aria-describedby = { ariaDescribedBy }+ aria-disabled = { ariaDisabled }+ aria-expanded = { ariaExpanded }+ aria-haspopup = { ariaHasPopup }+ aria-label = { ariaLabel }+ aria-pressed = { ariaPressed }+ className = { `jitsi-icon ${className || ''}` }+ id = { containerId }onClick = { onClick }- style = { restStyle }>+ onKeyDown = { onKeyDown }+ onKeyPress = { onKeyPressHandler }+ role = { role }+ style = { restStyle }+ tabIndex = { tabIndex }><IconComponentfill = { calculatedColor }height = { calculatedSize }diff --git a/react/features/base/popover/components/Popover.web.js b/react/features/base/popover/components/Popover.web.jsindex 81d818ad6b..7eeac35c28 100644--- a/react/features/base/popover/components/Popover.web.js+++ b/react/features/base/popover/components/Popover.web.js@@ -129,7 +129,9 @@ class Popover extends Component<Props, State> {// Bind event handlers so they are only bound once for every instance.this._onHideDialog = this._onHideDialog.bind(this);this._onShowDialog = this._onShowDialog.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);this._drawerContainerRef = React.createRef();+ this._onEscKey = this._onEscKey.bind(this);}/**@@ -207,6 +209,7 @@ class Popover extends Component<Props, State> {<divclassName = { className }id = { id }+ onKeyPress = { this._onKeyPress }onMouseEnter = { this._onShowDialog }onMouseLeave = { this._onHideDialog }><InlineDialog@@ -231,13 +234,13 @@ class Popover extends Component<Props, State> {this.setState({ showDialog: false });}- _onShowDialog: () => void;+ _onShowDialog: (Object) => void;/*** Displays the {@code InlineDialog} and calls any registered onPopoverOpen* callbacks.*- * @param {MouseEvent} event - The mouse event to intercept.+ * @param {Object} event - The mouse event or the keypress event to intercept.* @private* @returns {void}*/@@ -252,6 +255,45 @@ class Popover extends Component<Props, State> {}}+ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ if (this.state.showDialog) {+ this._onHideDialog();+ } else {+ this._onShowDialog(e);+ }+ }+ }++ _onEscKey: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onEscKey(e) {+ if (e.key === 'Escape') {+ e.preventDefault();+ e.stopPropagation();+ if (this.state.showDialog) {+ this._onHideDialog();+ }+ }+ }+/*** Renders the React Element to be displayed in the {@code InlineDialog}.* Also adds padding to support moving the mouse from the trigger to the@@ -264,7 +306,9 @@ class Popover extends Component<Props, State> {const { content, position } = this.props;return (- <div className = 'popover'>+ <div+ className = 'popover'+ onKeyDown = { this._onEscKey }>{ content }<div className = 'popover-mouse-padding-top' /><div className = { _mapPositionToPaddingClass(position) } />diff --git a/react/features/base/premeeting/components/web/ActionButton.js b/react/features/base/premeeting/components/web/ActionButton.jsindex 4286e4ed4b..3d380115d4 100644--- a/react/features/base/premeeting/components/web/ActionButton.js+++ b/react/features/base/premeeting/components/web/ActionButton.js@@ -1,6 +1,6 @@// @flow-import React from 'react';+import React, { useCallback } from 'react';import { Icon, IconArrowDown } from '../../../icons';@@ -46,10 +46,36 @@ type Props = {*/onClick: Function,+/*** Click handler for options.*/- onOptionsClick?: Function+ onOptionsClick?: Function,++ /**+ * to navigate with the keyboard.+ */+ tabIndex?: number,++ /**+ * to give a role to the icon.+ */+ role?: string,++ /**+ * to give a aria-pressed to the icon.+ */+ ariaPressed?: boolean,++ /**+ * The Label of the current element+ */+ ariaLabel?: string,++ /**+ * The Label of the child element+ */+ ariaDropDownLabel?: string};/**@@ -66,23 +92,57 @@ function ActionButton({testId,type = 'primary',onClick,- onOptionsClick+ onOptionsClick,+ tabIndex,+ role,+ ariaPressed,+ ariaLabel,+ ariaDropDownLabel}: Props) {++ const onKeyPressHandler = useCallback(e => {+ if (onClick && !disabled && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ onClick(e);+ }+ }, [ onClick, disabled ]);++ const onOptionsKeyPressHandler = useCallback(e => {+ if (onOptionsClick && !disabled && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ e.stopPropagation();+ onOptionsClick(e);+ }+ }, [ onOptionsClick, disabled ]);+return (<div+ aria-disabled = { disabled }+ aria-label = { ariaLabel }className = { `action-btn ${className} ${type} ${disabled ? 'disabled' : ''}` }data-testid = { testId ? testId : undefined }- onClick = { disabled ? undefined : onClick }>+ onClick = { disabled ? undefined : onClick }+ onKeyPress = { onKeyPressHandler }+ role = 'button'+ tabIndex = { 0 } >{children}- {hasOptions && <div- className = 'options'- data-testid = 'prejoin.joinOptions'- onClick = { disabled ? undefined : onOptionsClick }>- <Icon- className = 'icon'- size = { 14 }- src = { OptionsIcon } />- </div>+ { hasOptions+ && <div+ aria-disabled = { disabled }+ aria-haspopup = 'true'+ aria-label = { ariaDropDownLabel }+ aria-pressed = { ariaPressed }+ className = 'options'+ data-testid = 'prejoin.joinOptions'+ onClick = { disabled ? undefined : onOptionsClick }+ onKeyPress = { onOptionsKeyPressHandler }+ role = { role }+ tabIndex = { tabIndex }>+ <Icon+ className = 'icon'+ size = { 14 }+ src = { OptionsIcon } />+ </div>}</div>);diff --git a/react/features/base/premeeting/components/web/ConnectionStatus.js b/react/features/base/premeeting/components/web/ConnectionStatus.jsindex 1dff1de9d5..d1bb781a96 100644--- a/react/features/base/premeeting/components/web/ConnectionStatus.js+++ b/react/features/base/premeeting/components/web/ConnectionStatus.js@@ -1,6 +1,6 @@// @flow-import React, { useState } from 'react';+import React, { useCallback, useState } from 'react';import { translate } from '../../../i18n';import { Icon, IconArrowDownSmall, IconWifi1Bar, IconWifi2Bars, IconWifi3Bars } from '../../../icons';@@ -65,24 +65,50 @@ function ConnectionStatus({ connectionDetails, t, connectionType }: Props) {? 'con-status-details-visible': 'con-status-details-hidden';+ const onToggleDetails = useCallback(e => {+ e.preventDefault();+ toggleDetails(!showDetails);+ }, [ showDetails, toggleDetails ]);++ const onKeyPressToggleDetails = useCallback(e => {+ if (toggleDetails && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ toggleDetails(!showDetails);+ }+ }, [ showDetails, toggleDetails ]);+return (<div className = 'con-status'><div className = 'con-status-container'>- <div className = 'con-status-header'>+ <div+ aria-level = { 1 }+ className = 'con-status-header'+ role = 'heading'><div className = { `con-status-circle ${connectionClass}` }><Iconsize = { 16 }src = { icon } /></div>- <span className = 'con-status-text'>{t(connectionText)}</span>+ <span+ aria-hidden = { !showDetails }+ className = 'con-status-text'+ id = 'connection-status-description'>{t(connectionText)}</span><Icon+ ariaDescribedBy = 'connection-status-description'+ ariaPressed = { showDetails }className = { arrowClassName }- // eslint-disable-next-line react/jsx-no-bind- onClick = { () => toggleDetails(!showDetails) }+ onClick = { onToggleDetails }+ onKeyPress = { onKeyPressToggleDetails }+ role = 'button'size = { 24 }- src = { IconArrowDownSmall } />+ src = { IconArrowDownSmall }+ tabIndex = { 0 } /></div>- <div className = { `con-status-details ${detailsClassName}` }>{detailsText}</div>+ <div+ aria-level = '2'+ className = { `con-status-details ${detailsClassName}` }+ role = 'heading'>+ {detailsText}</div></div></div>);diff --git a/react/features/base/premeeting/components/web/CopyMeetingUrl.js b/react/features/base/premeeting/components/web/CopyMeetingUrl.jsindex 5da7af3bb9..a84875e761 100644--- a/react/features/base/premeeting/components/web/CopyMeetingUrl.js+++ b/react/features/base/premeeting/components/web/CopyMeetingUrl.js@@ -2,11 +2,11 @@import React, { Component } from 'react';+import CopyMeetingLinkSection+ from '../../../../invite/components/add-people-dialog/web/CopyMeetingLinkSection';import { getCurrentConferenceUrl } from '../../../connection';import { translate } from '../../../i18n';-import { Icon, IconCopy, IconCheck } from '../../../icons';import { connect } from '../../../redux';-import { copyText, getDecodedURI } from '../../../util';type Props = {@@ -27,152 +27,11 @@ type Props = {_enableAutomaticUrlCopy: boolean,};-type State = {-- /**- * If true it shows the 'copy link' message.- */- showCopyLink: boolean,-- /**- * If true it shows the 'link copied' message.- */- showLinkCopied: boolean,-};--const COPY_TIMEOUT = 2000;/*** Component used to copy meeting url on prejoin page.*/-class CopyMeetingUrl extends Component<Props, State> {-- /**- * Initializes a new {@code Prejoin} instance.- *- * @inheritdoc- */- constructor(props) {- super(props);-- this.state = {- showCopyLink: false,- showLinkCopied: false- };- this._copyUrl = this._copyUrl.bind(this);- this._hideCopyLink = this._hideCopyLink.bind(this);- this._hideLinkCopied = this._hideLinkCopied.bind(this);- this._showCopyLink = this._showCopyLink.bind(this);- this._showLinkCopied = this._showLinkCopied.bind(this);- this._copyUrlAutomatically = this._copyUrlAutomatically.bind(this);- }-- _copyUrl: () => void;-- /**- * Callback invoked to copy the url to clipboard.- *- * @returns {void}- */- async _copyUrl() {- const success = await copyText(this.props.url);-- if (success) {- this._showLinkCopied();- window.setTimeout(this._hideLinkCopied, COPY_TIMEOUT);- }- }-- _hideLinkCopied: () => void;-- /**- * Hides the 'Link copied' message.- *- * @private- * @returns {void}- */- _hideLinkCopied() {- this.setState({- showLinkCopied: false- });- }-- _hideCopyLink: () => void;-- /**- * Hides the 'Copy link' text.- *- * @private- * @returns {void}- */- _hideCopyLink() {- this.setState({- showCopyLink: false,- showLinkCopied: false- });- }-- _showCopyLink: () => void;-- /**- * Shows the dark 'Copy link' text on hover.- *- * @private- * @returns {void}- */- _showCopyLink() {- this.setState({- showCopyLink: true,- showLinkCopied: false- });- }-- _showLinkCopied: () => void;-- /**- * Shows the green 'Link copied' message.- *- * @private- * @returns {void}- */- _showLinkCopied() {- this.setState({- showLinkCopied: true,- showCopyLink: false- });- }-- _copyUrlAutomatically: () => void;-- /**- * Attempts to automatically copy invitation URL.- * Document has to be focused in order for this to work.- *- * @private- * @returns {void}- */- async _copyUrlAutomatically() {- const isCopied = await copyText(this.props.url);-- if (isCopied) {- this._showLinkCopied();- window.setTimeout(this._hideLinkCopied, COPY_TIMEOUT);- }- }-- /**- * Implements React's {@link Component#componentDidMount()}. Invoked- * immediately before mounting occurs.- *- * @inheritdoc- */- componentDidMount() {- const { _enableAutomaticUrlCopy } = this.props;-- if (_enableAutomaticUrlCopy) {- setTimeout(this._copyUrlAutomatically, 2000);- }- }+class CopyMeetingUrl extends Component<Props> {/*** Implements React's {@link Component#render()}.@@ -181,29 +40,9 @@ class CopyMeetingUrl extends Component<Props, State> {* @returns {ReactElement}*/render() {- const { showCopyLink, showLinkCopied } = this.state;- const { url, t } = this.props;- const { _copyUrl, _showCopyLink, _hideCopyLink } = this;- const src = showLinkCopied ? IconCheck : IconCopy;-return (- <div- className = 'copy-meeting'- onMouseEnter = { _showCopyLink }- onMouseLeave = { _hideCopyLink }>- <div- className = { `url ${showLinkCopied ? 'done' : ''}` }- onClick = { _copyUrl } >- <div className = 'copy-meeting-text'>- { !showCopyLink && !showLinkCopied && getDecodedURI(url) }- { showCopyLink && t('prejoin.copyAndShare') }- { showLinkCopied && t('prejoin.linkCopied') }- </div>- <Icon- onClick = { _copyUrl }- size = { 24 }- src = { src } />- </div>+ <div className = 'copy-meeting'>+ <CopyMeetingLinkSection url = { this.props.url } /></div>);}diff --git a/react/features/base/premeeting/components/web/InputField.js b/react/features/base/premeeting/components/web/InputField.jsindex 66ae40b791..eaf39a7887 100644--- a/react/features/base/premeeting/components/web/InputField.js+++ b/react/features/base/premeeting/components/web/InputField.js@@ -44,7 +44,9 @@ type Props = {/*** Externally provided value.*/- value?: string+ value?: string,+ id?: string,+ autoComplete?: string};type State = {@@ -114,9 +116,11 @@ export default class InputField extends PureComponent<Props, State> {render() {return (<input+ autoComplete = { this.props.autoComplete }autoFocus = { this.props.autoFocus }className = { `field ${this.state.focused ? 'focused' : ''} ${this.props.className || ''}` }data-testid = { this.props.testId ? this.props.testId : undefined }+ id = { this.props.id }onBlur = { this._onBlur }onChange = { this._onChange }onFocus = { this._onFocus }diff --git a/react/features/base/premeeting/components/web/PreMeetingScreen.js b/react/features/base/premeeting/components/web/PreMeetingScreen.jsindex 5500a0fd6b..a718d1d74e 100644--- a/react/features/base/premeeting/components/web/PreMeetingScreen.js+++ b/react/features/base/premeeting/components/web/PreMeetingScreen.js@@ -108,9 +108,9 @@ export default class PreMeetingScreen extends PureComponent<Props> {)}{showConferenceInfo && (<>- <div className = 'title'>+ <h1 className = 'title'>{ title }- </div>+ </h1>{showSharingButton ? <CopyMeetingUrl /> : null}</>)}diff --git a/react/features/base/premeeting/components/web/ToggleButton.js b/react/features/base/premeeting/components/web/ToggleButton.jsindex c4fdbb437b..ef0f8356a5 100644--- a/react/features/base/premeeting/components/web/ToggleButton.js+++ b/react/features/base/premeeting/components/web/ToggleButton.js@@ -1,6 +1,6 @@// @flow-import React from 'react';+import React, { useCallback } from 'react';import { Icon, IconCheck } from '../../../icons';@@ -32,10 +32,22 @@ type Props = {function ToggleButton({ children, isToggled, onClick }: Props) {const className = isToggled ? `${mainClass} ${mainClass}--toggled` : mainClass;+ const onKeyPressHandler = useCallback(e => {+ if (onClick && (e.key === ' ')) {+ e.preventDefault();+ onClick();+ }+ }, [ onClick ]);+return (<div+ aria-checked = { isToggled }className = { className }- onClick = { onClick }>+ id = 'toggle-button'+ onClick = { onClick }+ onKeyPress = { onKeyPressHandler }+ role = 'switch'+ tabIndex = { 0 }><div className = 'toggle-button-container'><div className = 'toggle-button-icon-container'><Icon@@ -43,7 +55,7 @@ function ToggleButton({ children, isToggled, onClick }: Props) {size = { 10 }src = { IconCheck } /></div>- <span>{children}</span>+ <label htmlFor = 'toggle-button'>{children}</label></div></div>);diff --git a/react/features/base/react/components/web/MeetingsList.js b/react/features/base/react/components/web/MeetingsList.jsindex 64f63555c9..65cf01be80 100644--- a/react/features/base/react/components/web/MeetingsList.js+++ b/react/features/base/react/components/web/MeetingsList.js@@ -4,7 +4,8 @@ import React, { Component } from 'react';import {getLocalizedDateFormatter,- getLocalizedDurationFormatter+ getLocalizedDurationFormatter,+ translate} from '../../../i18n';import { Icon, IconTrash } from '../../../icons';@@ -41,7 +42,12 @@ type Props = {/*** Handler for deleting an item.*/- onItemDelete?: Function+ onItemDelete?: Function,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -80,7 +86,7 @@ function _toTimeString(times) {** @extends Component*/-export default class MeetingsList extends Component<Props> {+class MeetingsList extends Component<Props> {/*** Constructor of the MeetingsList component.*@@ -99,7 +105,7 @@ export default class MeetingsList extends Component<Props> {* @returns {React.ReactNode}*/render() {- const { listEmptyComponent, meetings } = this.props;+ const { listEmptyComponent, meetings, t } = this.props;/*** If there are no recent meetings we don't want to display anything@@ -107,7 +113,10 @@ export default class MeetingsList extends Component<Props> {if (meetings) {return (<Container- className = 'meetings-list'>+ aria-label = { t('welcomepage.recentList') }+ className = 'meetings-list'+ role = 'menu'+ tabIndex = '-1'>{meetings.length === 0? listEmptyComponent@@ -139,6 +148,29 @@ export default class MeetingsList extends Component<Props> {return null;}+ _onKeyPress: string => Function;++ /**+ * Returns a function that is used in the onPress callback of the items.+ *+ * @param {string} url - The URL of the item to navigate to.+ * @private+ * @returns {Function}+ */+ _onKeyPress(url) {+ const { disabled, onPress } = this.props;++ if (!disabled && url && typeof onPress === 'function') {+ return e => {+ if (e.key === ' ' || e.key === 'Enter') {+ onPress(url);+ }+ };+ }++ return null;+ }+_onDelete: Object => Function;/**@@ -158,6 +190,27 @@ export default class MeetingsList extends Component<Props> {};}+ _onDeleteKeyPress: Object => Function;++ /**+ * Returns a function that is used on the onDelete keypress callback.+ *+ * @param {Object} item - The item to be deleted.+ * @private+ * @returns {Function}+ */+ _onDeleteKeyPress(item) {+ const { onItemDelete } = this.props;++ return e => {+ if (onItemDelete && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ e.stopPropagation();+ onItemDelete(item);+ }+ };+ }+_renderItem: (Object, number) => React$Node;/**@@ -176,17 +229,22 @@ export default class MeetingsList extends Component<Props> {title,url} = meeting;- const { hideURL = false, onItemDelete } = this.props;+ const { hideURL = false, onItemDelete, t } = this.props;const onPress = this._onPress(url);+ const onKeyPress = this._onKeyPress(url);const rootClassName= `item ${onPress ? 'with-click-handler' : 'without-click-handler'}`;return (<Container+ aria-label = { title }className = { rootClassName }key = { index }- onClick = { onPress }>+ onClick = { onPress }+ onKeyPress = { onKeyPress }+ role = 'menuitem'+ tabIndex = { 0 }><Container className = 'left-column'><Text className = 'title'>{ _toDateString(date) }@@ -216,11 +274,17 @@ export default class MeetingsList extends Component<Props> {{ elementAfter || null }{ onItemDelete && <Icon+ ariaLabel = { t('welcomepage.recentListDelete') }className = 'delete-meeting'onClick = { this._onDelete(meeting) }- src = { IconTrash } />}+ onKeyPress = { this._onDeleteKeyPress(meeting) }+ role = 'button'+ src = { IconTrash }+ tabIndex = { 0 } />}</Container></Container>);}}++export default translate(MeetingsList);diff --git a/react/features/base/react/components/web/Watermarks.js b/react/features/base/react/components/web/Watermarks.jsindex d05e6e4d80..afdad18a66 100644--- a/react/features/base/react/components/web/Watermarks.js+++ b/react/features/base/react/components/web/Watermarks.js@@ -160,13 +160,15 @@ class Watermarks extends Component<Props, State> {_logoUrl,_showJitsiWatermark} = this.props;+ const { t } = this.props;let reactElement = null;if (_showJitsiWatermark) {const style = {backgroundImage: `url(${_logoUrl})`,maxWidth: 140,- maxHeight: 70+ maxHeight: 70,+ position: _logoLink ? 'static' : 'absolute'};reactElement = (<div@@ -176,6 +178,8 @@ class Watermarks extends Component<Props, State> {if (_logoLink) {reactElement = (<a+ aria-label = { t('jitsiHome', { logo: interfaceConfig.APP_NAME }) }+ className = 'watermark leftwatermark'href = { _logoLink }target = '_new'>{ reactElement }diff --git a/react/features/base/toolbox/components/AbstractButton.js b/react/features/base/toolbox/components/AbstractButton.jsindex c0af079d94..bdd6892d4d 100644--- a/react/features/base/toolbox/components/AbstractButton.js+++ b/react/features/base/toolbox/components/AbstractButton.js@@ -246,14 +246,18 @@ export default class AbstractButton<P: Props, S: *> extends Component<P, S> {* Handles clicking / pressing the button, and toggles the audio mute state* accordingly.*+ * @param {Object} e - Event.* @private* @returns {void}*/- _onClick() {+ _onClick(e) {const { afterClick } = this.props;this._handleClick();- afterClick && afterClick();+ afterClick && afterClick(e);++ // blur after click to release focus from button to allow PTT.+ e && e.currentTarget && e.currentTarget.blur();}/**diff --git a/react/features/base/toolbox/components/BetaTag.js b/react/features/base/toolbox/components/BetaTag.jsindex 75234f3e64..432bb757a4 100644--- a/react/features/base/toolbox/components/BetaTag.js+++ b/react/features/base/toolbox/components/BetaTag.js@@ -6,6 +6,10 @@ import { translate } from '../../i18n';import { Container, Text } from '../../react';type Props = {++ /**+ * Invoked to obtain translated strings.+ */t: Function};diff --git a/react/features/base/toolbox/components/ToolboxItem.web.js b/react/features/base/toolbox/components/ToolboxItem.web.jsindex 450e378da5..8ec1338135 100644--- a/react/features/base/toolbox/components/ToolboxItem.web.js+++ b/react/features/base/toolbox/components/ToolboxItem.web.js@@ -20,29 +20,21 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {constructor(props: Props) {super(props);- this._onKeyDown = this._onKeyDown.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);}- _onKeyDown: (Object) => void;+ _onKeyPress: (Object) => void;/**- * Handles 'Enter' key on the button to trigger onClick for accessibility.- * We should be handling Space onKeyUp but it conflicts with PTT.+ * Handles 'Enter' and Space key on the button to trigger onClick for accessibility.** @param {Object} event - The key event.* @private* @returns {void}*/- _onKeyDown(event) {- // If the event coming to the dialog has been subject to preventDefault- // we don't handle it here.- if (event.defaultPrevented) {- return;- }-- if (event.key === 'Enter') {+ _onKeyPress(event) {+ if (event.key === 'Enter' || event.key === ' ') {event.preventDefault();- event.stopPropagation();this.props.onClick();}}@@ -72,9 +64,9 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {'aria-label': this.accessibilityLabel,className: className + (disabled ? ' disabled' : ''),onClick: disabled ? undefined : onClick,- onKeyDown: this._onKeyDown,+ onKeyPress: this._onKeyPress,tabIndex: 0,- role: 'button'+ role: showLabel ? 'menuitem' : 'button'};const elementType = showLabel ? 'li' : 'div';diff --git a/react/features/base/toolbox/components/web/OverflowMenuItem.js b/react/features/base/toolbox/components/web/OverflowMenuItem.jsindex bc5a7afff0..a89f79b1a5 100644--- a/react/features/base/toolbox/components/web/OverflowMenuItem.js+++ b/react/features/base/toolbox/components/web/OverflowMenuItem.js@@ -74,6 +74,35 @@ class OverflowMenuItem extends Component<Props> {disabled: false};+ /**+ * Initializes a new {@code OverflowMenuItem} instance.+ *+ * @param {*} props - The read-only properties with which the new instance+ * is to be initialized.+ */+ constructor(props: Props) {+ super(props);++ // Bind event handler so it is only bound once for every instance.+ this._onKeyPress = this._onKeyPress.bind(this);+ }++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (!this.props.disabled && this.props.onClick && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ this.props.onClick();+ }+ }+/*** Implements React's {@link Component#render()}.*@@ -89,9 +118,13 @@ class OverflowMenuItem extends Component<Props> {return (<li+ aria-disabled = { disabled }aria-label = { accessibilityLabel }className = { className }- onClick = { disabled ? null : onClick }>+ onClick = { disabled ? null : onClick }+ onKeyPress = { this._onKeyPress }+ role = 'menuitem'+ tabIndex = { 0 }><span className = 'overflow-menu-item-icon'><Iconid = { iconId }diff --git a/react/features/base/toolbox/components/web/ToolboxButtonWithIcon.js b/react/features/base/toolbox/components/web/ToolboxButtonWithIcon.jsindex c0fe74dfe9..cd4c36bcef 100644--- a/react/features/base/toolbox/components/web/ToolboxButtonWithIcon.js+++ b/react/features/base/toolbox/components/web/ToolboxButtonWithIcon.js@@ -36,6 +36,36 @@ type Props = {* Additional styles.*/styles?: Object,++ /**+ * aria label for the Icon.+ */+ ariaLabel?: string,++ /**+ * whether the element has a popup+ */+ ariaHasPopup?: boolean,++ /**+ * whether the element popup is expanded+ */+ ariaExpanded?: boolean,++ /**+ * The id of the element this button icon controls+ */+ ariaControls?: string,++ /**+ * keydown handler for icon.+ */+ onIconKeyDown?: Function,++ /**+ * The ID of the icon button+ */+ iconId: string};/**@@ -51,7 +81,13 @@ export default function ToolboxButtonWithIcon(props: Props) {iconDisabled,iconTooltip,onIconClick,- styles+ onIconKeyDown,+ styles,+ ariaLabel,+ ariaHasPopup,+ ariaControls,+ ariaExpanded,+ iconId} = props;const iconProps = {};@@ -62,6 +98,12 @@ export default function ToolboxButtonWithIcon(props: Props) {} else {iconProps.className = 'settings-button-small-icon';iconProps.onClick = onIconClick;+ iconProps.onKeyDown = onIconKeyDown;+ iconProps.role = 'button';+ iconProps.tabIndex = 0;+ iconProps.ariaControls = ariaControls;+ iconProps.ariaExpanded = ariaExpanded;+ iconProps.containerId = iconId;}@@ -77,6 +119,8 @@ export default function ToolboxButtonWithIcon(props: Props) {position = 'top'><Icon{ ...iconProps }+ ariaHasPopup = { ariaHasPopup }+ ariaLabel = { ariaLabel }size = { 9 }src = { icon } /></Tooltip>diff --git a/react/features/base/toolbox/components/web/ToolboxItem.js b/react/features/base/toolbox/components/web/ToolboxItem.jsindex 34b77a891a..8ef60a6427 100644--- a/react/features/base/toolbox/components/web/ToolboxItem.js+++ b/react/features/base/toolbox/components/web/ToolboxItem.js@@ -19,29 +19,21 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {constructor(props: Props) {super(props);- this._onKeyDown = this._onKeyDown.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);}- _onKeyDown: (Object) => void;+ _onKeyPress: (Object) => void;/**- * Handles 'Enter' key on the button to trigger onClick for accessibility.- * We should be handling Space onKeyUp but it conflicts with PTT.+ * Handles 'Enter' and Space key on the button to trigger onClick for accessibility.** @param {Object} event - The key event.* @private* @returns {void}*/- _onKeyDown(event) {- // If the event coming to the dialog has been subject to preventDefault- // we don't handle it here.- if (event.defaultPrevented) {- return;- }-- if (event.key === 'Enter') {+ _onKeyPress(event) {+ if (event.key === 'Enter' || event.key === ' ') {event.preventDefault();- event.stopPropagation();this.props.onClick();}}@@ -71,9 +63,9 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {'aria-label': this.accessibilityLabel,className: className + (disabled ? ' disabled' : ''),onClick: disabled ? undefined : onClick,- onKeyDown: this._onKeyDown,+ onKeyPress: this._onKeyPress,tabIndex: 0,- role: 'button'+ role: showLabel ? 'menuitem' : 'button'};const elementType = showLabel ? 'li' : 'div';diff --git a/react/features/calendar-sync/components/AddMeetingUrlButton.web.js b/react/features/calendar-sync/components/AddMeetingUrlButton.web.jsindex 0b1a1cb600..08b6d6e1ea 100644--- a/react/features/calendar-sync/components/AddMeetingUrlButton.web.js+++ b/react/features/calendar-sync/components/AddMeetingUrlButton.web.js@@ -55,6 +55,7 @@ class AddMeetingUrlButton extends Component<Props> {// Bind event handler so it is only bound once for every instance.this._onClick = this._onClick.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);}/**@@ -67,7 +68,9 @@ class AddMeetingUrlButton extends Component<Props> {<Tooltip content = { this.props.t('calendarSync.addMeetingURL') }><divclassName = 'button add-button'- onClick = { this._onClick }>+ onClick = { this._onClick }+ onKeyPress = { this._onKeyPress }+ role = 'button'><Icon src = { IconAdd } /></div></Tooltip>@@ -88,6 +91,22 @@ class AddMeetingUrlButton extends Component<Props> {dispatch(updateCalendarEvent(eventId, calendarId));}++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onClick();+ }+ }}export default translate(connect()(AddMeetingUrlButton));diff --git a/react/features/calendar-sync/components/CalendarList.web.js b/react/features/calendar-sync/components/CalendarList.web.jsindex 812bad2cc9..180a6aee06 100644--- a/react/features/calendar-sync/components/CalendarList.web.js+++ b/react/features/calendar-sync/components/CalendarList.web.js@@ -72,6 +72,7 @@ class CalendarList extends AbstractPage<Props> {this._getRenderListEmptyComponent= this._getRenderListEmptyComponent.bind(this);this._onOpenSettings = this._onOpenSettings.bind(this);+ this._onKeyPressOpenSettings = this._onKeyPressOpenSettings.bind(this);this._onRefreshEvents = this._onRefreshEvents.bind(this);}@@ -187,7 +188,9 @@ class CalendarList extends AbstractPage<Props> {return (<div className = 'meetings-list-empty'><div className = 'meetings-list-empty-image'>- <img src = './images/calendar.svg' />+ <img+ alt = { t('welcomepage.logo.calendar') }+ src = './images/calendar.svg' /></div><div className = 'description'>{ t('welcomepage.connectCalendarText', {@@ -197,7 +200,9 @@ class CalendarList extends AbstractPage<Props> {</div><divclassName = 'meetings-list-empty-button'- onClick = { this._onOpenSettings }>+ onClick = { this._onOpenSettings }+ onKeyPress = { this._onKeyPressOpenSettings }+ role = 'button'><IconclassName = 'meetings-list-empty-icon'src = { IconPlusCalendar } />@@ -221,6 +226,22 @@ class CalendarList extends AbstractPage<Props> {this.props.dispatch(openSettingsDialog(SETTINGS_TABS.CALENDAR));}+ _onKeyPressOpenSettings: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPressOpenSettings(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onOpenSettings();+ }+ }+_onRefreshEvents: () => void;diff --git a/react/features/calendar-sync/components/JoinButton.web.js b/react/features/calendar-sync/components/JoinButton.web.jsindex db04dded39..0da6ade242 100644--- a/react/features/calendar-sync/components/JoinButton.web.js+++ b/react/features/calendar-sync/components/JoinButton.web.js@@ -45,6 +45,7 @@ class JoinButton extends Component<Props> {// Bind event handler so it is only bound once for every instance.this._onClick = this._onClick.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);}/**@@ -60,7 +61,9 @@ class JoinButton extends Component<Props> {content = { t('calendarSync.joinTooltip') }><divclassName = 'button join-button'- onClick = { this._onClick }>+ onClick = { this._onClick }+ onKeyPress = { this._onKeyPress }+ role = 'button'><Iconsize = '14'src = { IconAdd } />@@ -81,6 +84,22 @@ class JoinButton extends Component<Props> {_onClick(event) {this.props.onPress(event, this.props.url);}++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onClick();+ }+ }}export default translate(JoinButton);diff --git a/react/features/calendar-sync/components/MicrosoftSignInButton.web.js b/react/features/calendar-sync/components/MicrosoftSignInButton.web.jsindex 54c1d1f4c7..932aef40ca 100644--- a/react/features/calendar-sync/components/MicrosoftSignInButton.web.js+++ b/react/features/calendar-sync/components/MicrosoftSignInButton.web.js@@ -2,17 +2,29 @@import React, { Component } from 'react';+import { translate } from '../../base/i18n';++/*** The type of the React {@code Component} props of* {@link MicrosoftSignInButton}.*/type Props = {- // The callback to invoke when {@code MicrosoftSignInButton} is clicked.+ /**+ * The callback to invoke when {@code MicrosoftSignInButton} is clicked.+ */onClick: Function,- // The text to display within {@code MicrosoftSignInButton}.- text: string+ /**+ * The text to display within {@code MicrosoftSignInButton}.+ */+ text: string,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -20,7 +32,7 @@ type Props = {** @extends Component*/-export default class MicrosoftSignInButton extends Component<Props> {+class MicrosoftSignInButton extends Component<Props> {/*** Implements React's {@link Component#render()}.*@@ -33,6 +45,7 @@ export default class MicrosoftSignInButton extends Component<Props> {className = 'microsoft-sign-in'onClick = { this.props.onClick }><img+ alt = { this.props.t('welcomepage.logo.microsoftLogo') }className = 'microsoft-logo'src = 'images/microsoftLogo.svg' /><div className = 'microsoft-cta'>@@ -42,3 +55,5 @@ export default class MicrosoftSignInButton extends Component<Props> {);}}++export default translate(MicrosoftSignInButton);diff --git a/react/features/chat/components/web/Chat.js b/react/features/chat/components/web/Chat.jsindex 1d2fd8d153..f50a4230c5 100644--- a/react/features/chat/components/web/Chat.js+++ b/react/features/chat/components/web/Chat.js@@ -4,6 +4,7 @@ import React from 'react';import { translate } from '../../../base/i18n';import { connect } from '../../../base/redux';+import { toggleChat } from '../../actions.web';import AbstractChat, {_mapStateToProps,type Props@@ -51,6 +52,8 @@ class Chat extends AbstractChat<Props> {// Bind event handlers so they are only bound once for every instance.this._renderPanelContent = this._renderPanelContent.bind(this);this._onChatInputResize = this._onChatInputResize.bind(this);+ this._onEscClick = this._onEscClick.bind(this);+ this._onToggleChat = this._onToggleChat.bind(this);}/**@@ -74,6 +77,21 @@ class Chat extends AbstractChat<Props> {this._scrollMessageContainerToBottom(false);}}+ _onEscClick: (KeyboardEvent) => void;++ /**+ * Click handler for the chat sidenav.+ *+ * @param {KeyboardEvent} event - Esc key click to close the popup.+ * @returns {void}+ */+ _onEscClick(event) {+ if (event.key === 'Escape' && this.props._isOpen) {+ event.preventDefault();+ event.stopPropagation();+ this._onToggleChat();+ }+ }/*** Implements React's {@link Component#render()}.@@ -135,7 +153,10 @@ class Chat extends AbstractChat<Props> {*/_renderChatHeader() {return (- <Header className = 'chat-header' />+ <Header+ className = 'chat-header'+ id = 'chat-header'+ onCancel = { this._onToggleChat } />);}@@ -177,8 +198,10 @@ class Chat extends AbstractChat<Props> {return (<div+ aria-haspopup = 'true'className = { `sideToolbarContainer ${className}` }- id = 'sideToolbarContainer'>+ id = 'sideToolbarContainer'+ onKeyDown = { this._onEscClick } >{ ComponentToRender }</div>);@@ -199,6 +222,18 @@ class Chat extends AbstractChat<Props> {}_onSendMessage: (string) => void;++ _onToggleChat: () => void;++ /**+ * Toggles the chat window.+ *+ * @returns {Function}+ */+ _onToggleChat() {+ this.props.dispatch(toggleChat());+ }+}export default translate(connect(_mapStateToProps)(Chat));diff --git a/react/features/chat/components/web/ChatDialogHeader.js b/react/features/chat/components/web/ChatDialogHeader.jsindex 41286c271f..5070735250 100644--- a/react/features/chat/components/web/ChatDialogHeader.js+++ b/react/features/chat/components/web/ChatDialogHeader.js@@ -1,7 +1,8 @@// @flow-import React from 'react';+import React, { useCallback } from 'react';+import { translate } from '../../../base/i18n';import { Icon, IconClose } from '../../../base/icons';import { connect } from '../../../base/redux';import { toggleChat } from '../../actions.web';@@ -17,6 +18,11 @@ type Props = {* An optional class name.*/className: string,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -24,17 +30,31 @@ type Props = {** @returns {React$Element<any>}*/-function Header({ onCancel, className }: Props) {+function Header({ onCancel, className, t }: Props) {++ const onKeyPressHandler = useCallback(e => {+ if (onCancel && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ onCancel();+ }+ }, [ onCancel ]);+return (<div- className = { className || 'chat-dialog-header' }>+ className = { className || 'chat-dialog-header' }+ role = 'heading'>+ { t('chat.title') }<Icon+ ariaLabel = { t('toolbar.closeChat') }onClick = { onCancel }- src = { IconClose } />+ onKeyPress = { onKeyPressHandler }+ role = 'button'+ src = { IconClose }+ tabIndex = { 0 } /></div>);}const mapDispatchToProps = { onCancel: toggleChat };-export default connect(null, mapDispatchToProps)(Header);+export default translate(connect(null, mapDispatchToProps)(Header));diff --git a/react/features/chat/components/web/ChatInput.js b/react/features/chat/components/web/ChatInput.jsindex b16d9d5534..2678aeda5c 100644--- a/react/features/chat/components/web/ChatInput.js+++ b/react/features/chat/components/web/ChatInput.js@@ -84,6 +84,9 @@ class ChatInput extends Component<Props, State> {this._onSmileySelect = this._onSmileySelect.bind(this);this._onSubmitMessage = this._onSubmitMessage.bind(this);this._onToggleSmileysPanel = this._onToggleSmileysPanel.bind(this);+ this._onEscHandler = this._onEscHandler.bind(this);+ this._onToggleSmileysPanelKeyPress = this._onToggleSmileysPanelKeyPress.bind(this);+ this._onSubmitMessageKeyPress = this._onSubmitMessageKeyPress.bind(this);this._setTextAreaRef = this._setTextAreaRef.bind(this);}@@ -116,8 +119,15 @@ class ChatInput extends Component<Props, State> {<div id = 'smileysarea'><div id = 'smileys'><div+ aria-expanded = { this.state.showSmileysPanel }+ aria-haspopup = 'smileysContainer'+ aria-label = { this.props.t('chat.smileysPanel') }className = 'smiley-button'- onClick = { this._onToggleSmileysPanel }>+ onClick = { this._onToggleSmileysPanel }+ onKeyDown = { this._onEscHandler }+ onKeyPress = { this._onToggleSmileysPanelKeyPress }+ role = 'button'+ tabIndex = { 0 }><Icon src = { IconSmile } /></div></div>@@ -129,19 +139,26 @@ class ChatInput extends Component<Props, State> {</div><div className = 'usrmsg-form'><TextareaAutosize+ autoComplete = 'off'+ autoFocus = { true }id = 'usermsg'- inputRef = { this._setTextAreaRef }maxRows = { 5 }onChange = { this._onMessageChange }onHeightChange = { this.props.onResize }onKeyDown = { this._onDetectSubmit }placeholder = { this.props.t('chat.messagebox') }+ ref = { this._setTextAreaRef }+ tabIndex = { 0 }value = { this.state.message } /></div><div className = 'send-button-container'><div+ aria-label = { this.props.t('chat.sendButton') }className = 'send-button'- onClick = { this._onSubmitMessage }>+ onClick = { this._onSubmitMessage }+ onKeyPress = { this._onSubmitMessageKeyPress }+ role = 'button'+ tabIndex = { this.state.message.trim() ? 0 : -1 } ><Icon src = { IconPlane } /></div></div>@@ -192,14 +209,32 @@ class ChatInput extends Component<Props, State> {* @returns {void}*/_onDetectSubmit(event) {- if (event.keyCode === 13- && event.shiftKey === false) {+ if (event.key === 'Enter'+ && event.shiftKey === false+ && event.ctrlKey === false) {event.preventDefault();+ event.stopPropagation();this._onSubmitMessage();}}+ _onSubmitMessageKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onSubmitMessageKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onSubmitMessage();+ }+ }+_onMessageChange: (Object) => void;/**@@ -224,10 +259,16 @@ class ChatInput extends Component<Props, State> {* @returns {void}*/_onSmileySelect(smileyText) {- this.setState({- message: `${this.state.message} ${smileyText}`,- showSmileysPanel: false- });+ if (smileyText) {+ this.setState({+ message: `${this.state.message} ${smileyText}`,+ showSmileysPanel: false+ });+ } else {+ this.setState({+ showSmileysPanel: false+ });+ }this._focus();}@@ -241,9 +282,44 @@ class ChatInput extends Component<Props, State> {* @returns {void}*/_onToggleSmileysPanel() {+ if (this.state.showSmileysPanel) {+ this._focus();+ }this.setState({ showSmileysPanel: !this.state.showSmileysPanel });+ }- this._focus();+ _onEscHandler: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onEscHandler(e) {+ // Escape handling does not work in onKeyPress+ if (this.state.showSmileysPanel && e.key === 'Escape') {+ e.preventDefault();+ e.stopPropagation();+ this._onToggleSmileysPanel();+ }+ }++ _onToggleSmileysPanelKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onToggleSmileysPanelKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onToggleSmileysPanel();+ }}_setTextAreaRef: (?HTMLTextAreaElement) => void;diff --git a/react/features/chat/components/web/ChatMessage.js b/react/features/chat/components/web/ChatMessage.jsindex a467b2057e..8000c17fec 100644--- a/react/features/chat/components/web/ChatMessage.js+++ b/react/features/chat/components/web/ChatMessage.js@@ -23,7 +23,7 @@ class ChatMessage extends AbstractChatMessage<Props> {* @returns {ReactElement}*/render() {- const { message } = this.props;+ const { message, t } = this.props;const processedMessage = [];// content is an array of text and emoji components@@ -38,12 +38,20 @@ class ChatMessage extends AbstractChatMessage<Props> {});return (- <div className = 'chatmessage-wrapper'>+ <div+ className = 'chatmessage-wrapper'+ tabIndex = { -1 }><div className = { `chatmessage ${message.privateMessage ? 'privatemessage' : ''}` }><div className = 'replywrapper'><div className = 'messagecontent'>{ this.props.showDisplayName && this._renderDisplayName() }<div className = 'usermessage'>+ <span className = 'sr-only'>+ { this.props.message.displayName === this.props.message.recipient+ ? t('chat.messageAccessibleTitleMe')+ : t('chat.messageAccessibleTitle',+ { user: this.props.message.displayName }) }+ </span>{ processedMessage }</div>{ message.privateMessage && this._renderPrivateNotice() }@@ -77,7 +85,9 @@ class ChatMessage extends AbstractChatMessage<Props> {*/_renderDisplayName() {return (- <div className = 'display-name'>+ <div+ aria-hidden = { true }+ className = 'display-name'>{ this.props.message.displayName }</div>);diff --git a/react/features/chat/components/web/DisplayNameForm.js b/react/features/chat/components/web/DisplayNameForm.jsindex a32af69e6e..7f23ded214 100644--- a/react/features/chat/components/web/DisplayNameForm.js+++ b/react/features/chat/components/web/DisplayNameForm.js@@ -59,6 +59,7 @@ class DisplayNameForm extends Component<Props, State> {// Bind event handlers so they are only bound once for every instance.this._onDisplayNameChange = this._onDisplayNameChange.bind(this);this._onSubmit = this._onSubmit.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);}/**@@ -74,6 +75,8 @@ class DisplayNameForm extends Component<Props, State> {<div id = 'nickname'><form onSubmit = { this._onSubmit }><FieldTextStateless+ aria-describedby = 'nickname-title'+ autoComplete = 'name'autoFocus = { true }compact = { true }id = 'nickinput'@@ -86,7 +89,10 @@ class DisplayNameForm extends Component<Props, State> {</form><divclassName = { `enter-chat${this.state.displayName.trim() ? '' : ' disabled'}` }- onClick = { this._onSubmit }>+ onClick = { this._onSubmit }+ onKeyPress = { this._onKeyPress }+ role = 'button'+ tabIndex = { 0 }>{ t('chat.enter') }</div><KeyboardAvoider />@@ -125,6 +131,21 @@ class DisplayNameForm extends Component<Props, State> {displayName: this.state.displayName}));}++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ this._onSubmit(e);+ }+ }}export default translate(connect()(DisplayNameForm));diff --git a/react/features/chat/components/web/MessageContainer.js b/react/features/chat/components/web/MessageContainer.jsindex dd10e5a6f2..8146c3973e 100644--- a/react/features/chat/components/web/MessageContainer.js+++ b/react/features/chat/components/web/MessageContainer.js@@ -70,9 +70,12 @@ export default class MessageContainer extends AbstractMessageContainer<Props> {return (<div+ aria-labelledby = 'chat-header'id = 'chatconversation'onScroll = { this._onChatScroll }- ref = { this._messageListRef }>+ ref = { this._messageListRef }+ role = 'log'+ tabIndex = { 0 }>{ messages }<div ref = { this._messagesListEndRef } /></div>diff --git a/react/features/chat/components/web/MessageRecipient.js b/react/features/chat/components/web/MessageRecipient.jsindex 032b3aa15d..41254f7014 100644--- a/react/features/chat/components/web/MessageRecipient.js+++ b/react/features/chat/components/web/MessageRecipient.js@@ -15,6 +15,35 @@ import AbstractMessageRecipient, {* Class to implement the displaying of the recipient of the next message.*/class MessageRecipient extends AbstractMessageRecipient<Props> {+ /**+ * Initializes a new {@code MessageRecipient} instance.+ *+ * @param {*} props - The read-only properties with which the new instance+ * is to be initialized.+ */+ constructor(props) {+ super(props);++ // Bind event handler so it is only bound once for every instance.+ this._onKeyPress = this._onKeyPress.bind(this);+ }++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (this.props._onRemovePrivateMessageRecipient && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ this.props._onRemovePrivateMessageRecipient();+ }+ }+/*** Implements {@code PureComponent#render}.*@@ -30,13 +59,20 @@ class MessageRecipient extends AbstractMessageRecipient<Props> {const { t } = this.props;return (- <div id = 'chat-recipient'>+ <div+ id = 'chat-recipient'+ role = 'alert'><span>{ t('chat.messageTo', {recipient: _privateMessageRecipient}) }</span>- <div onClick = { this.props._onRemovePrivateMessageRecipient }>+ <div+ aria-label = { t('dialog.close') }+ onClick = { this.props._onRemovePrivateMessageRecipient }+ onKeyPress = { this._onKeyPress }+ role = 'button'+ tabIndex = { 0 }><Iconsrc = { IconCancelSelection } /></div>diff --git a/react/features/chat/components/web/SmileysPanel.js b/react/features/chat/components/web/SmileysPanel.jsindex f849c78b66..305bcdaf68 100644--- a/react/features/chat/components/web/SmileysPanel.js+++ b/react/features/chat/components/web/SmileysPanel.js@@ -23,6 +23,69 @@ type Props = {* @extends Component*/class SmileysPanel extends PureComponent<Props> {+ /**+ * Initializes a new {@code SmileysPanel} instance.+ *+ * @param {*} props - The read-only properties with which the new instance+ * is to be initialized.+ */+ constructor(props: Props) {+ super(props);++ // Bind event handler so it is only bound once for every instance.+ this._onClick = this._onClick.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);+ this._onEscKey = this._onEscKey.bind(this);+ }++ _onEscKey: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onEscKey(e) {+ // Escape handling does not work in onKeyPress+ if (e.key === 'Escape') {+ e.preventDefault();+ e.stopPropagation();+ this.props.onSmileySelect();+ }+ }++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (e.key === ' ') {+ e.preventDefault();+ this.props.onSmileySelect(e.target.id && smileys[e.target.id]);+ }+ }++ _onClick: (Object) => void;++ /**+ * Click handler for to select emoji.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onClick(e) {+ e.preventDefault();+ this.props.onSmileySelect(e.currentTarget.id && smileys[e.currentTarget.id]);+ }+/*** Implements React's {@link Component#render()}.*@@ -30,40 +93,33 @@ class SmileysPanel extends PureComponent<Props> {* @returns {ReactElement}*/render() {- const smileyItems = Object.keys(smileys).map(smileyKey => {- const onSelectFunction = this._getOnSmileySelectCallback(smileyKey);-- return (- <div- className = 'smileyContainer'- id = { smileyKey }- key = { smileyKey }>- <Emoji- onClick = { onSelectFunction }- onlyEmojiClassName = 'smiley'- text = { smileys[smileyKey] } />- </div>- );- });+ const smileyItems = Object.keys(smileys).map(smileyKey => (+ <div+ className = 'smileyContainer'+ id = { smileyKey }+ key = { smileyKey }+ onClick = { this._onClick }+ onKeyDown = { this._onEscKey }+ onKeyPress = { this._onKeyPress }+ role = 'option'+ tabIndex = { 0 }>+ <Emoji+ onlyEmojiClassName = 'smiley'+ text = { smileys[smileyKey] } />+ </div>+ ));return (- <div id = 'smileysContainer'>+ <div+ aria-orientation = 'horizontal'+ id = 'smileysContainer'+ onKeyDown = { this._onEscKey }+ role = 'listbox'+ tabIndex = { -1 }>{ smileyItems }</div>);}-- /**- * Helper method to bind a smiley's click handler.- *- * @param {string} smileyKey - The key from the {@link smileys} object- * that should be added to the chat message.- * @private- * @returns {Function}- */- _getOnSmileySelectCallback(smileyKey) {- return () => this.props.onSmileySelect(smileys[smileyKey]);- }}export default SmileysPanel;diff --git a/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js b/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.jsindex b2b3999eb0..903bfa28e9 100644--- a/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js+++ b/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js@@ -107,6 +107,8 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {this._onInstallExtensionClick = this._onInstallExtensionClick.bind(this);this._shouldNotRender = this._shouldNotRender.bind(this);this._onDontShowAgainChange = this._onDontShowAgainChange.bind(this);+ this._onCloseKeyPress = this._onCloseKeyPress.bind(this);+ this._onInstallExtensionKeyPress = this._onInstallExtensionKeyPress.bind(this);}/**@@ -169,6 +171,22 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {this.setState({ closePressed: true });}+ _onCloseKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onCloseKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onClosePressed();+ }+ }+_onInstallExtensionClick: () => void;/**@@ -182,6 +200,22 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {this.setState({ closePressed: true });}+ _onInstallExtensionKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onInstallExtensionKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onClosePressed();+ }+ }+_shouldNotRender: () => boolean;/**@@ -236,16 +270,23 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {return (<div className = { mainClassNames }>- <div className = 'chrome-extension-banner__container'>- <div- className = 'chrome-extension-banner__icon-container' />+ <div+ aria-aria-describedby = 'chrome-extension-banner__text-container'+ className = 'chrome-extension-banner__container'+ role = 'banner'>+ <div className = 'chrome-extension-banner__icon-container' /><div- className = 'chrome-extension-banner__text-container'>+ className = 'chrome-extension-banner__text-container'+ id = 'chrome-extension-banner__text-container'>{ t('chromeExtensionBanner.installExtensionText') }</div><div+ aria-label = { t('chromeExtensionBanner.close') }className = 'chrome-extension-banner__close-container'- onClick = { this._onClosePressed }>+ onClick = { this._onClosePressed }+ onKeyPress = { this._onCloseKeyPress }+ role = 'button'+ tabIndex = { 0 }><IconclassName = 'gray'size = { 12 }@@ -255,18 +296,28 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {<divclassName = 'chrome-extension-banner__button-container'><div+ aria-labelledby = 'chrome-extension-banner__button-text'className = 'chrome-extension-banner__button-open-url'- onClick = { this._onInstallExtensionClick }>+ onClick = { this._onInstallExtensionClick }+ onKeyPress = { this._onInstallExtensionKeyPress }+ role = 'button'+ tabIndex = { 0 }><div- className = 'chrome-extension-banner__button-text'>+ className = 'chrome-extension-banner__button-text'+ id = 'chrome-extension-banner__button-text'>{ t('chromeExtensionBanner.buttonText') }</div></div></div><div className = 'chrome-extension-banner__checkbox-container'>- <label className = 'chrome-extension-banner__checkbox-label'>+ <label+ className = 'chrome-extension-banner__checkbox-label'+ htmlFor = 'chrome-extension-banner__checkbox'+ id = 'chrome-extension-banner__checkbox-label'><input+ aria-labelledby = 'chrome-extension-banner__checkbox-label'checked = { this.state.dontShowAgainChecked }+ id = 'chrome-extension-banner__checkbox'onChange = { this._onDontShowAgainChange }type = 'checkbox' /> { t('chromeExtensionBanner.dontShowAgain') }diff --git a/react/features/conference/components/web/InviteMore.js b/react/features/conference/components/web/InviteMore.jsindex a7c78ceacb..e44e223027 100644--- a/react/features/conference/components/web/InviteMore.js+++ b/react/features/conference/components/web/InviteMore.js@@ -1,6 +1,6 @@// @flow-import React from 'react';+import React, { useCallback } from 'react';import { translate } from '../../../base/i18n';import { Icon, IconInviteMore } from '../../../base/icons';@@ -47,16 +47,28 @@ function InviteMore({onClick,t}: Props) {+ const onKeyPressHandler = useCallback(e => {+ if (onClick && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ onClick();+ }+ }, [ onClick ]);+return (_shouldShow? <div className = { `invite-more-container${_toolboxVisible ? '' : ' elevated'}` }><div className = 'invite-more-content'>- <div className = 'invite-more-header'>+ <div+ className = 'invite-more-header'+ role = 'heading'>{t('addPeople.inviteMoreHeader')}</div><divclassName = 'invite-more-button'- onClick = { onClick }>+ onClick = { onClick }+ onKeyPress = { onKeyPressHandler }+ role = 'button'+ tabIndex = { 0 }><Icon src = { IconInviteMore } /><div className = 'invite-more-button-text'>{t('addPeople.inviteMorePrompt')}diff --git a/react/features/connection-stats/components/ConnectionStatsTable.js b/react/features/connection-stats/components/ConnectionStatsTable.jsindex 7c33ffad38..d3382368f4 100644--- a/react/features/connection-stats/components/ConnectionStatsTable.js+++ b/react/features/connection-stats/components/ConnectionStatsTable.js@@ -572,7 +572,9 @@ class ConnectionStatsTable extends Component<Props> {<span><aclassName = 'savelogs link'- onClick = { this.props.onSaveLogs } >+ onClick = { this.props.onSaveLogs }+ role = 'button'+ tabIndex = { 0 }>{ this.props.t('connectionindicator.savelogs') }</a><span> | </span>@@ -597,7 +599,9 @@ class ConnectionStatsTable extends Component<Props> {return (<aclassName = 'showmore link'- onClick = { this.props.onShowMore } >+ onClick = { this.props.onShowMore }+ role = 'button'+ tabIndex = { 0 }>{ this.props.t(translationKey) }</a>);diff --git a/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js b/react/features/deep-linking/components/DeepLinkingDesktopPage.web.jsindex 76f9cc2bd5..b432c0e9a1 100644--- a/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js+++ b/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js@@ -87,6 +87,7 @@ class DeepLinkingDesktopPage<P : Props> extends Component<P> {HIDE_DEEP_LINKING_LOGO? null: <img+ alt = { t('welcomepage.logo.logoDeepLinking') }className = 'logo'src = 'images/logo-deep-linking.png' />}diff --git a/react/features/deep-linking/components/DeepLinkingMobilePage.web.js b/react/features/deep-linking/components/DeepLinkingMobilePage.web.jsindex 4c6f7e237f..fb17f4f203 100644--- a/react/features/deep-linking/components/DeepLinkingMobilePage.web.js+++ b/react/features/deep-linking/components/DeepLinkingMobilePage.web.js@@ -119,6 +119,7 @@ class DeepLinkingMobilePage extends Component<Props> {HIDE_DEEP_LINKING_LOGO? null: <img+ alt = { t('welcomepage.logo.logoDeepLinking') }className = 'logo'src = 'images/logo-deep-linking.png' />}@@ -127,6 +128,7 @@ class DeepLinkingMobilePage extends Component<Props> {{SHOW_DEEP_LINKING_IMAGE? <img+ alt = { t('welcomepage.logo.logoDeepLinking') }className = 'image'src = 'images/deep-linking-image.png' />: nulldiff --git a/react/features/desktop-picker/components/DesktopSourcePreview.js b/react/features/desktop-picker/components/DesktopSourcePreview.jsindex cfc3890f89..62584558b2 100644--- a/react/features/desktop-picker/components/DesktopSourcePreview.js+++ b/react/features/desktop-picker/components/DesktopSourcePreview.js@@ -2,6 +2,9 @@import React, { Component } from 'react';+import { translate } from '../../base/i18n';++/*** The type of the React {@code Component} props of* {@link DesktopSourcePreview}.@@ -35,7 +38,12 @@ type Props = {/*** The source type of the DesktopCapturerSources to display.*/- type: string+ type: string,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -74,6 +82,7 @@ class DesktopSourcePreview extends Component<Props> {onDoubleClick = { this._onDoubleClick }><div className = 'desktop-source-preview-image-container'><img+ alt = { this.props.t('welcomepage.logo.desktopPreviewThumbnail') }className = 'desktop-source-preview-thumbnail'src = { this.props.source.thumbnail.toDataURL() } /></div>@@ -111,4 +120,4 @@ class DesktopSourcePreview extends Component<Props> {}}-export default DesktopSourcePreview;+export default translate(DesktopSourcePreview);diff --git a/react/features/device-selection/components/AudioOutputPreview.js b/react/features/device-selection/components/AudioOutputPreview.jsindex 0d5e67a4e4..66c010f6eb 100644--- a/react/features/device-selection/components/AudioOutputPreview.js+++ b/react/features/device-selection/components/AudioOutputPreview.js@@ -44,6 +44,7 @@ class AudioOutputPreview extends Component<Props> {this._audioElementReady = this._audioElementReady.bind(this);this._onClick = this._onClick.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);}/**@@ -66,7 +67,12 @@ class AudioOutputPreview extends Component<Props> {render() {return (<div className = 'audio-output-preview'>- <a onClick = { this._onClick }>+ <a+ aria-label = { this.props.t('deviceSelection.testAudio') }+ onClick = { this._onClick }+ onKeyPress = { this._onKeyPress }+ role = 'button'+ tabIndex = { 0 }>{ this.props.t('deviceSelection.testAudio') }</a><Audio@@ -105,6 +111,22 @@ class AudioOutputPreview extends Component<Props> {&& this._audioElement.play();}+ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onClick();+ }+ }+/*** Updates the target output device for playing the test sound.*diff --git a/react/features/device-selection/components/DeviceSelection.js b/react/features/device-selection/components/DeviceSelection.jsindex d932084fc9..41e339b325 100644--- a/react/features/device-selection/components/DeviceSelection.js+++ b/react/features/device-selection/components/DeviceSelection.js@@ -232,7 +232,9 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {track = { this.state.previewAudioTrack } /> }</div><div className = 'device-selection-column column-selectors'>- <div className = 'device-selectors'>+ <div+ aria-live = 'polite all'+ className = 'device-selectors'>{ this._renderSelectors() }</div>{ !hideAudioOutputSelect@@ -344,9 +346,11 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {_renderSelector(deviceSelectorProps) {return (<div key = { deviceSelectorProps.label }>- <div className = 'device-selector-label'>+ <label+ className = 'device-selector-label'+ htmlFor = { deviceSelectorProps.id }>{ this.props.t(deviceSelectorProps.label) }- </div>+ </label><DeviceSelector { ...deviceSelectorProps } /></div>);@@ -370,6 +374,7 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {isDisabled: this.props.disableAudioInputChange|| this.props.disableDeviceChange,key: 'audioInput',+ id: 'audioInput',label: 'settings.selectMic',onSelect: selectedAudioInputId =>super._onChange({ selectedAudioInputId }),@@ -385,6 +390,7 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {icon: 'icon-camera',isDisabled: this.props.disableDeviceChange,key: 'videoInput',+ id: 'videoInput',label: 'settings.selectCamera',onSelect: selectedVideoInputId =>super._onChange({ selectedVideoInputId }),@@ -400,6 +406,7 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {icon: 'icon-speaker',isDisabled: this.props.disableDeviceChange,key: 'audioOutput',+ id: 'audioOutput',label: 'settings.selectAudioOutput',onSelect: selectedAudioOutputId =>super._onChange({ selectedAudioOutputId }),diff --git a/react/features/device-selection/components/DeviceSelector.web.js b/react/features/device-selection/components/DeviceSelector.web.jsindex 4b79d3811d..257a52c8b9 100644--- a/react/features/device-selection/components/DeviceSelector.web.js+++ b/react/features/device-selection/components/DeviceSelector.web.js@@ -51,7 +51,12 @@ type Props = {/*** Invoked to obtain translated strings.*/- t: Function+ t: Function,++ /**+ * The id of the dropdown element+ */+ id: string};/**@@ -81,6 +86,10 @@ class DeviceSelector extends Component<Props> {* @returns {ReactElement}*/render() {+ if (this.props.hasPermission === undefined) {+ return null;+ }+if (!this.props.hasPermission) {return this._renderNoPermission();}@@ -134,14 +143,10 @@ class DeviceSelector extends Component<Props> {_createDropdownItem(device) {return (<DropdownItem+ data-deviceid = { device.deviceId }+ isSelected = { device.deviceId === this.props.selectedDeviceId }key = { device.deviceId }- // eslint-disable-next-line react/jsx-no-bind- onClick = {- e => {- e.stopPropagation();- this._onSelect(device.deviceId);- }- }>+ onClick = { this._onSelect }>{ device.label || device.deviceId }</DropdownItem>);@@ -183,7 +188,8 @@ class DeviceSelector extends Component<Props> {shouldFitContainer = { true }trigger = { triggerText }triggerButtonProps = {{- shouldFitContainer: true+ shouldFitContainer: true,+ id: this.props.id}}triggerType = 'button'><DropdownItemGroup>@@ -199,13 +205,16 @@ class DeviceSelector extends Component<Props> {/*** Invokes the passed in callback to notify of selection changes.*- * @param {Object} newDeviceId - Selected device id from DropdownMenu option.+ * @param {Object} e - The key event to handle.+ ** @private* @returns {void}*/- _onSelect(newDeviceId) {- if (this.props.selectedDeviceId !== newDeviceId) {- this.props.onSelect(newDeviceId);+ _onSelect(e) {+ const deviceId = e.currentTarget.getAttribute('data-deviceid');++ if (this.props.selectedDeviceId !== deviceId) {+ this.props.onSelect(deviceId);}}diff --git a/react/features/e2ee/components/E2EESection.js b/react/features/e2ee/components/E2EESection.jsindex d28d9e99f8..be6bd5502a 100644--- a/react/features/e2ee/components/E2EESection.js+++ b/react/features/e2ee/components/E2EESection.js@@ -85,6 +85,7 @@ class E2EESection extends Component<Props, State> {// Bind event handlers so they are only bound once for every instance.this._onExpand = this._onExpand.bind(this);+ this._onExpandKeyPress = this._onExpandKeyPress.bind(this);this._onToggle = this._onToggle.bind(this);}@@ -101,12 +102,20 @@ class E2EESection extends Component<Props, State> {return (<div id = 'e2ee-section'>- <p className = 'description'>+ <p+ aria-live = 'polite'+ className = 'description'+ id = 'e2ee-section-description'>{ expand && description }{ !expand && description.substring(0, 100) }{ !expand && <span+ aria-controls = 'e2ee-section-description'+ aria-expanded = { expand }className = 'read-more'- onClick = { this._onExpand }>+ onClick = { this._onExpand }+ onKeyPress = { this._onExpandKeyPress }+ role = 'button'+ tabIndex = { 0 }>... { t('dialog.readMore') }</span> }</p>@@ -142,6 +151,22 @@ class E2EESection extends Component<Props, State> {});}+ _onExpandKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onExpandKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onExpand();+ }+ }+_onToggle: () => void;/**diff --git a/react/features/embed-meeting/components/EmbedMeetingDialog.js b/react/features/embed-meeting/components/EmbedMeetingDialog.jsindex 43cf64aa10..7e5d95d61d 100644--- a/react/features/embed-meeting/components/EmbedMeetingDialog.js+++ b/react/features/embed-meeting/components/EmbedMeetingDialog.js@@ -44,10 +44,12 @@ function EmbedMeeting({ t, url }: Props) {width = 'small'><div className = 'embed-meeting-dialog'><textarea+ aria-label = { t('dialog.embedMeeting') }className = 'embed-meeting-code'readOnly = { true }value = { getEmbedCode() } /><CopyButton+ aria-label = { t('addPeople.copyLink') }className = 'embed-meeting-copy'displayedText = { t('dialog.copy') }textOnCopySuccess = { t('dialog.copied') }diff --git a/react/features/embed-meeting/components/EmbedMeetingTrigger.js b/react/features/embed-meeting/components/EmbedMeetingTrigger.jsindex c179eca923..bb535992f8 100644--- a/react/features/embed-meeting/components/EmbedMeetingTrigger.js+++ b/react/features/embed-meeting/components/EmbedMeetingTrigger.js@@ -36,10 +36,28 @@ function EmbedMeetingTrigger({ t, openEmbedDialog }: Props) {openEmbedDialog(EmbedMeetingDialog);}+ /**+ * KeyPress handler for accessibility.+ *+ * @param {React.KeyboardEventHandler<HTMLDivElement>} e - The key event to handle.+ *+ * @returns {void}+ */+ function onKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ onClick();+ }+ }+return (<div+ aria-label = { t('embedMeeting.title') }className = 'embed-meeting-trigger'- onClick = { onClick }>+ onClick = { onClick }+ onKeyPress = { onKeyPress }+ role = 'button'+ tabIndex = { 0 }>{t('embedMeeting.title')}</div>);diff --git a/react/features/feedback/components/FeedbackDialog.web.js b/react/features/feedback/components/FeedbackDialog.web.jsindex cb6f822d83..103769fbda 100644--- a/react/features/feedback/components/FeedbackDialog.web.js+++ b/react/features/feedback/components/FeedbackDialog.web.js@@ -154,6 +154,12 @@ class FeedbackDialog extends Component<Props, State> {this._scoreClickConfigurations = SCORES.map((textKey, index) => {return {_onClick: () => this._onScoreSelect(index),+ _onKeyPres: e => {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onScoreSelect(index);+ }+ },_onMouseOver: () => this._onScoreMouseOver(index)};});@@ -200,6 +206,8 @@ class FeedbackDialog extends Component<Props, State> {const scoreToDisplayAsSelected= mousedOverScore > -1 ? mousedOverScore : score;+ const { t } = this.props;+const scoreIcons = this._scoreClickConfigurations.map((config, index) => {const isFilled = index <= scoreToDisplayAsSelected;@@ -208,11 +216,15 @@ class FeedbackDialog extends Component<Props, State> {= `star-btn ${scoreAnimationClass} ${activeClass}`;return (- <a+ <span+ aria-label = { t(SCORES[index]) }className = { className }key = { index }onClick = { config._onClick }- onMouseOver = { config._onMouseOver }>+ onKeyPress = { config._onKeyPres }+ onMouseOver = { config._onMouseOver }+ role = 'button'+ tabIndex = { 0 }>{ isFilled? <StarFilledIconlabel = 'star-filled'@@ -220,11 +232,10 @@ class FeedbackDialog extends Component<Props, State> {: <StarIconlabel = 'star'size = 'xlarge' /> }- </a>+ </span>);});- const { t } = this.props;return (<Dialog@@ -234,7 +245,9 @@ class FeedbackDialog extends Component<Props, State> {titleKey = 'feedback.rateExperience'><div className = 'feedback-dialog'><div className = 'rating'>- <div className = 'star-label'>+ <div+ aria-label = { this.props.t('feedback.star') }+ className = 'star-label' ><p id = 'starLabel'>{ t(SCORES[scoreToDisplayAsSelected]) }</p>diff --git a/react/features/filmstrip/components/web/Filmstrip.js b/react/features/filmstrip/components/web/Filmstrip.jsindex 8003eabd92..35f59a6249 100644--- a/react/features/filmstrip/components/web/Filmstrip.js+++ b/react/features/filmstrip/components/web/Filmstrip.js@@ -13,7 +13,8 @@ import { translate } from '../../../base/i18n';import { Icon, IconMenuDown, IconMenuUp } from '../../../base/icons';import { getLocalParticipant } from '../../../base/participants';import { connect } from '../../../base/redux';-import { isButtonEnabled } from '../../../toolbox/functions.web';+import { showToolbox } from '../../../toolbox/actions.web';+import { isButtonEnabled, isToolboxVisible } from '../../../toolbox/functions.web';import { LAYOUTS, getCurrentLayout } from '../../../video-layout';import { setFilmstripVisible } from '../../actions';import { shouldRemoteVideosBeVisible } from '../../functions';@@ -83,6 +84,11 @@ type Props = {*/_visible: boolean,+ /**+ * Whether or not the toolbox is displayed.+ */+ _isToolboxVisible: Boolean,+/*** The redux {@code dispatch} function.*/@@ -114,6 +120,7 @@ class Filmstrip extends Component <Props> {// Bind event handlers so they are only bound once for every instance.this._onShortcutToggleFilmstrip = this._onShortcutToggleFilmstrip.bind(this);this._onToolbarToggleFilmstrip = this._onToolbarToggleFilmstrip.bind(this);+ this._onTabIn = this._onTabIn.bind(this);}/**@@ -238,6 +245,19 @@ class Filmstrip extends Component <Props> {);}+ _onTabIn: () => void;++ /**+ * Toggle the toolbar visibility when tabbing into it.+ *+ * @returns {void}+ */+ _onTabIn() {+ if (!this.props._isToolboxVisible && this.props._visible) {+ this.props.dispatch(showToolbox());+ }+ }+/*** Dispatches an action to change the visibility of the filmstrip.*@@ -298,12 +318,18 @@ class Filmstrip extends Component <Props> {const { t } = this.props;return (- <div className = 'filmstrip__toolbar'>+ <div+ className = 'filmstrip__toolbar'><button+ aria-expanded = { this.props._visible }aria-label = { t('toolbar.accessibilityLabel.toggleFilmstrip') }id = 'toggleFilmstripButton'- onClick = { this._onToolbarToggleFilmstrip }>- <Icon src = { icon } />+ onClick = { this._onToolbarToggleFilmstrip }+ onFocus = { this._onTabIn }+ tabIndex = { 0 }>+ <Icon+ aria-label = { t('toolbar.accessibilityLabel.toggleFilmstrip') }+ src = { icon } /></button></div>);@@ -342,7 +368,8 @@ function _mapStateToProps(state) {_participants: state['features/base/participants'],_rows: gridDimensions.rows,_videosClassName: videosClassName,- _visible: visible+ _visible: visible,+ _isToolboxVisible: isToolboxVisible(state)};}diff --git a/react/features/filmstrip/components/web/Thumbnail.js b/react/features/filmstrip/components/web/Thumbnail.jsindex dcd1ccaaef..0017a79416 100644--- a/react/features/filmstrip/components/web/Thumbnail.js+++ b/react/features/filmstrip/components/web/Thumbnail.js@@ -737,12 +737,12 @@ class Thumbnail extends Component<Props, State> {participantID = { id } /></div>{ this._renderAvatar(styles.avatar) }- <span className = 'localvideomenu'>- <LocalVideoMenuTriggerButton />- </span><span className = 'audioindicator-container'><AudioLevelIndicator audioLevel = { audioLevel } /></span>+ <span className = 'localvideomenu'>+ <LocalVideoMenuTriggerButton />+ </span></span>);}@@ -867,15 +867,15 @@ class Thumbnail extends Component<Props, State> {className = 'presence-label'participantID = { id } /></div>+ <span className = 'audioindicator-container'>+ <AudioLevelIndicator audioLevel = { audioLevel } />+ </span><span className = 'remotevideomenu'><RemoteVideoMenuTriggerButtoninitialVolumeValue = { volume }onVolumeChange = { onVolumeChange }participantID = { id } /></span>- <span className = 'audioindicator-container'>- <AudioLevelIndicator audioLevel = { audioLevel } />- </span></span>);}diff --git a/react/features/google-api/components/GoogleSignInButton.web.js b/react/features/google-api/components/GoogleSignInButton.web.jsindex d79824048e..4945162dbc 100644--- a/react/features/google-api/components/GoogleSignInButton.web.js+++ b/react/features/google-api/components/GoogleSignInButton.web.js@@ -27,6 +27,7 @@ class GoogleSignInButton extends AbstractGoogleSignInButton {className = 'google-sign-in'onClick = { this.props.onClick }><img+ alt = { t('welcomepage.logo.googleLogo') }className = 'google-logo'src = 'images/googleLogo.svg' /><div className = 'google-cta'>diff --git a/react/features/invite/components/add-people-dialog/web/CopyMeetingLinkSection.js b/react/features/invite/components/add-people-dialog/web/CopyMeetingLinkSection.jsindex 4f07ddc0e9..04c2faa5a0 100644--- a/react/features/invite/components/add-people-dialog/web/CopyMeetingLinkSection.js+++ b/react/features/invite/components/add-people-dialog/web/CopyMeetingLinkSection.js@@ -28,10 +28,12 @@ type Props = {function CopyMeetingLinkSection({ t, url }: Props) {return (<>- <span>{t('addPeople.shareLink')}</span>+ <label htmlFor = { 'copy-button-id' }>{t('addPeople.shareLink')}</label><CopyButton+ aria-label = { t('addPeople.copyLink') }className = 'invite-more-dialog-conference-url'displayedText = { getDecodedURI(url) }+ id = 'copy-button-id'textOnCopySuccess = { t('addPeople.linkCopied') }textOnHover = { t('addPeople.copyLink') }textToCopy = { url } />diff --git a/react/features/invite/components/add-people-dialog/web/DialInNumber.js b/react/features/invite/components/add-people-dialog/web/DialInNumber.jsindex 18ec441468..18488f5837 100644--- a/react/features/invite/components/add-people-dialog/web/DialInNumber.js+++ b/react/features/invite/components/add-people-dialog/web/DialInNumber.js@@ -49,6 +49,7 @@ class DialInNumber extends Component<Props> {// Bind event handler so it is only bound once for every instance.this._onCopyText = this._onCopyText.bind(this);+ this._onCopyTextKeyPress = this._onCopyTextKeyPress.bind(this);}_onCopyText: () => void;@@ -68,6 +69,22 @@ class DialInNumber extends Component<Props> {copyText(textToCopy);}+ _onCopyTextKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onCopyTextKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onCopyText();+ }+ }+/*** Implements React's {@link Component#render()}.*@@ -101,8 +118,12 @@ class DialInNumber extends Component<Props> {</span></div><a+ aria-label = { t('info.copyNumber') }className = 'dial-in-copy'- onClick = { this._onCopyText }>+ onClick = { this._onCopyText }+ onKeyPress = { this._onCopyTextKeyPress }+ role = 'button'+ tabIndex = { 0 }><Icon src = { IconCopy } /></a></div>diff --git a/react/features/invite/components/add-people-dialog/web/InviteByEmailSection.js b/react/features/invite/components/add-people-dialog/web/InviteByEmailSection.jsindex c86b6f4897..34493ec3a0 100644--- a/react/features/invite/components/add-people-dialog/web/InviteByEmailSection.js+++ b/react/features/invite/components/add-people-dialog/web/InviteByEmailSection.js@@ -52,6 +52,20 @@ function InviteByEmailSection({ inviteSubject, inviteText, t }: Props) {copyText(inviteText);}+ /**+ * Copies the conference invitation to the clipboard.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ function _onCopyTextKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ copyText(inviteText);+ }+ }+/*** Toggles the email invite drawer.*@@ -61,6 +75,20 @@ function InviteByEmailSection({ inviteSubject, inviteText, t }: Props) {setIsActive(!isActive);}+ /**+ * Toggles the email invite drawer.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ function _onToggleActiveStateKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ setIsActive(!isActive);+ }+ }+/*** Renders clickable elements that each open an email client* containing a conference invite.@@ -101,6 +129,7 @@ function InviteByEmailSection({ inviteSubject, inviteText, t }: Props) {key = { idx }position = 'top'><a+ aria-label = { t(tooltipKey) }className = 'provider-icon'href = { url }rel = 'noopener noreferrer'@@ -119,8 +148,13 @@ function InviteByEmailSection({ inviteSubject, inviteText, t }: Props) {<><div><div+ aria-expanded = { isActive }+ aria-label = { t('addPeople.shareInvite') }className = { `invite-more-dialog email-container${isActive ? ' active' : ''}` }- onClick = { _onToggleActiveState }>+ onClick = { _onToggleActiveState }+ onKeyPress = { _onToggleActiveStateKeyPress }+ role = 'button'+ tabIndex = { 0 }><span>{t('addPeople.shareInvite')}</span><Icon src = { IconArrowDownSmall } /></div>@@ -129,8 +163,12 @@ function InviteByEmailSection({ inviteSubject, inviteText, t }: Props) {content = { t('addPeople.copyInvite') }position = 'top'><div+ aria-label = { t('addPeople.copyInvite') }className = 'copy-invite-icon'- onClick = { _onCopyText }>+ onClick = { _onCopyText }+ onKeyPress = { _onCopyTextKeyPress }+ role = 'button'+ tabIndex = { 0 }><Icon src = { IconCopy } /></div></Tooltip>diff --git a/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js b/react/features/invite/components/add-people-dialog/web/InviteContactsForm.jsindex acdb219429..0325511fb1 100644--- a/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js+++ b/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js@@ -76,9 +76,11 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {// Bind event handlers so they are only bound once per instance.this._onClearItems = this._onClearItems.bind(this);+ this._onClearItemsKeyPress = this._onClearItemsKeyPress.bind(this);this._onItemSelected = this._onItemSelected.bind(this);this._onSelectionChange = this._onSelectionChange.bind(this);this._onSubmit = this._onSubmit.bind(this);+ this._onSubmitKeyPress = this._onSubmitKeyPress.bind(this);this._parseQueryResults = this._parseQueryResults.bind(this);this._setMultiSelectElement = this._setMultiSelectElement.bind(this);this._renderFooterText = this._renderFooterText.bind(this);@@ -246,6 +248,22 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {});}+ _onSubmitKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onSubmitKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onSubmit();+ }+ }+_onKeyDown: (Object) => void;/**@@ -425,6 +443,22 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {this.setState({ inviteItems: [] });}+ _onClearItemsKeyPress: () => void;++ /**+ * Clears the selected items from state and form.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onClearItemsKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onClearItems();+ }+ }+/*** Renders the add/cancel actions for the form.*@@ -441,13 +475,21 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {return (<div className = { `invite-more-dialog invite-buttons${this._isAddDisabled() ? ' disabled' : ''}` }><a+ aria-label = { t('dialog.Cancel') }className = 'invite-more-dialog invite-buttons-cancel'- onClick = { this._onClearItems }>+ onClick = { this._onClearItems }+ onKeyPress = { this._onClearItemsKeyPress }+ role = 'button'+ tabIndex = { 0 }>{t('dialog.Cancel')}</a><a+ aria-label = { t('addPeople.add') }className = 'invite-more-dialog invite-buttons-add'- onClick = { this._onSubmit }>+ onClick = { this._onSubmit }+ onKeyPress = { this._onSubmitKeyPress }+ role = 'button'+ tabIndex = { 0 }>{t('addPeople.add')}</a></div>@@ -480,9 +522,9 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {</span><span><a+ aria-label = { supportLink }href = { supportLink }- rel = 'noopener noreferrer'- target = '_blank'>+ rel = 'noopener noreferrer'>{ t('inlineDialogFailure.support') }</a></span>diff --git a/react/features/keyboard-shortcuts/components/KeyboardShortcutsDialog.web.js b/react/features/keyboard-shortcuts/components/KeyboardShortcutsDialog.web.jsindex 72711d9ffc..d54bfc9711 100644--- a/react/features/keyboard-shortcuts/components/KeyboardShortcutsDialog.web.js+++ b/react/features/keyboard-shortcuts/components/KeyboardShortcutsDialog.web.js@@ -71,7 +71,9 @@ class KeyboardShortcutsDialog extends Component<Props> {<liclassName = 'shortcuts-list__item'key = { keyboardKey }>- <span className = 'shortcuts-list__description'>+ <span+ aria-label = { this.props.t(translationKey) }+ className = 'shortcuts-list__description'>{ this.props.t(translationKey) }</span><span className = 'item-action'>diff --git a/react/features/large-video/components/LargeVideo.web.js b/react/features/large-video/components/LargeVideo.web.jsindex 802a25fa92..1ebf763be5 100644--- a/react/features/large-video/components/LargeVideo.web.js+++ b/react/features/large-video/components/LargeVideo.web.js@@ -102,7 +102,9 @@ class LargeVideo extends Component<Props> {* another container for the background and the* largeVideoWrapper in order to hide/show them.*/}- <div id = 'largeVideoWrapper'>+ <div+ id = 'largeVideoWrapper'+ role = 'figure' ><videoautoPlay = { !_noAutoPlayVideo }id = 'largeVideo'diff --git a/react/features/lobby/components/web/LobbySection.js b/react/features/lobby/components/web/LobbySection.jsindex e8e394e05d..0feeac5682 100644--- a/react/features/lobby/components/web/LobbySection.js+++ b/react/features/lobby/components/web/LobbySection.js@@ -89,7 +89,9 @@ class LobbySection extends PureComponent<Props, State> {return (<><div id = 'lobby-section'>- <p className = 'description'>+ <p+ className = 'description'+ role = 'banner'>{ t('lobby.enableDialogText') }</p><div className = 'control-row'>diff --git a/react/features/local-recording/components/LocalRecordingInfoDialog.js b/react/features/local-recording/components/LocalRecordingInfoDialog.jsindex 6f0938cfb9..c3351d2509 100644--- a/react/features/local-recording/components/LocalRecordingInfoDialog.js+++ b/react/features/local-recording/components/LocalRecordingInfoDialog.js@@ -306,11 +306,15 @@ class LocalRecordingInfoDialog extends Component<Props, State> {<div className = 'localrec-control-action-links'><div className = 'localrec-control-action-link'>{ isEngaged ? <a- onClick = { this._onStop }>+ onClick = { this._onStop }+ role = 'button'+ tabIndex = { 0 }>{ t('localRecording.stop') }</a>: <a- onClick = { this._onStart }>+ onClick = { this._onStart }+ role = 'button'+ tabIndex = { 0 }>{ t('localRecording.start') }</a>}diff --git a/react/features/notifications/components/web/Notification.js b/react/features/notifications/components/web/Notification.jsindex 11033ef9b6..152adca152 100644--- a/react/features/notifications/components/web/Notification.js+++ b/react/features/notifications/components/web/Notification.js@@ -81,9 +81,9 @@ class Notification extends AbstractNotification<Props> {// the id is used for testing the UIreturn (- <div data-testid = { this._getDescriptionKey() } >+ <p data-testid = { this._getDescriptionKey() } >{ description }- </div>+ </p>);}diff --git a/react/features/notifications/components/web/NotificationsContainer.js b/react/features/notifications/components/web/NotificationsContainer.jsindex 2bc7d69024..67e6db73c2 100644--- a/react/features/notifications/components/web/NotificationsContainer.js+++ b/react/features/notifications/components/web/NotificationsContainer.js@@ -3,6 +3,7 @@import { FlagGroup } from '@atlaskit/flag';import React from 'react';+import { translate } from '../../../base/i18n';import { connect } from '../../../base/redux';import AbstractNotificationsContainer, {_abstractMapStateToProps,@@ -16,7 +17,12 @@ type Props = AbstractProps & {/*** Whether we are a SIP gateway or not.*/- _iAmSipGateway: boolean+ _iAmSipGateway: boolean,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -42,6 +48,7 @@ class NotificationsContainer extends AbstractNotificationsContainer<Props> {return (<FlagGroupid = 'notifications-container'+ label = { this.props.t('notify.groupTitle') }onDismissed = { this._onDismissed }>{ this._renderFlags() }</FlagGroup>@@ -73,7 +80,6 @@ class NotificationsContainer extends AbstractNotificationsContainer<Props> {key = { uid }onDismissed = { this._onDismissed }uid = { uid } />-);});}@@ -96,4 +102,4 @@ function _mapStateToProps(state) {}-export default connect(_mapStateToProps)(NotificationsContainer);+export default translate(connect(_mapStateToProps)(NotificationsContainer));diff --git a/react/features/overlay/components/web/PageReloadOverlay.js b/react/features/overlay/components/web/PageReloadOverlay.jsindex e1e251026c..12cc179aee 100644--- a/react/features/overlay/components/web/PageReloadOverlay.js+++ b/react/features/overlay/components/web/PageReloadOverlay.js@@ -29,12 +29,20 @@ class PageReloadOverlay extends AbstractPageReloadOverlay<Props> {return (<OverlayFrame isLightOverlay = { isNetworkFailure }>- <div className = 'inlay'>+ <div+ aria-describedby = 'reload_overlay_text'+ aria-labelledby = 'reload_overlay_title'+ className = 'inlay'+ role = 'dialog'><span- className = 'reload_overlay_title'>+ className = 'reload_overlay_title'+ id = 'reload_overlay_title'+ role = 'heading'>{ t(title) }</span>- <span className = 'reload_overlay_text'>+ <span+ className = 'reload_overlay_text'+ id = 'reload_overlay_text'>{ t(message, { seconds: timeLeft }) }</span>{ this._renderProgressBar() }diff --git a/react/features/overlay/components/web/UserMediaPermissionsOverlay.js b/react/features/overlay/components/web/UserMediaPermissionsOverlay.jsindex b6aa34b515..27489b937d 100644--- a/react/features/overlay/components/web/UserMediaPermissionsOverlay.js+++ b/react/features/overlay/components/web/UserMediaPermissionsOverlay.js@@ -30,12 +30,17 @@ class UserMediaPermissionsOverlay extends AbstractUserMediaPermissionsOverlay {<div className = 'inlay'><span className = 'inlay__icon icon-microphone' /><span className = 'inlay__icon icon-camera' />- <h3 className = 'inlay__title'>+ <h3+ aria-label = { t('startupoverlay.genericTitle') }+ className = 'inlay__title'+ role = 'alert' >{t('startupoverlay.genericTitle')}</h3>- <span className = 'inlay__text'>+ <span+ className = 'inlay__text'+ role = 'alert' >{translateToHTML(t,`userMedia.${browser}GrantPermissions`)@@ -43,7 +48,9 @@ class UserMediaPermissionsOverlay extends AbstractUserMediaPermissionsOverlay {</span></div><div className = 'policy overlay__policy'>- <p className = 'policy__text'>+ <p+ className = 'policy__text'+ role = 'alert'>{ translateToHTML(t, 'startupoverlay.policyText') }</p>{@@ -66,7 +73,9 @@ class UserMediaPermissionsOverlay extends AbstractUserMediaPermissionsOverlay {if (policyLogoSrc) {return (<div className = 'policy__logo'>- <img src = { policyLogoSrc } />+ <img+ alt = { this.props.t('welcomepage.logo.policyLogo') }+ src = { policyLogoSrc } /></div>);}diff --git a/react/features/participants-pane/components/InviteButton.js b/react/features/participants-pane/components/InviteButton.jsindex df05d6f04c..734897dbf9 100644--- a/react/features/participants-pane/components/InviteButton.js+++ b/react/features/participants-pane/components/InviteButton.js@@ -21,7 +21,7 @@ export const InviteButton = () => {return (<ParticipantInviteButton- aria-label = { t('toolbar.accessibilityLabel.invite') }+ aria-label = { t('participantsPane.actions.invite') }onClick = { onInvite }><Iconsize = { 20 }diff --git a/react/features/participants-pane/components/MeetingParticipantItem.js b/react/features/participants-pane/components/MeetingParticipantItem.jsindex 605f07469d..ea71c52905 100644--- a/react/features/participants-pane/components/MeetingParticipantItem.js+++ b/react/features/participants-pane/components/MeetingParticipantItem.js@@ -1,6 +1,7 @@// @flowimport React from 'react';+import { useTranslation } from 'react-i18next';import { useSelector } from 'react-redux';import { getIsParticipantAudioMuted, getIsParticipantVideoMuted } from '../../base/tracks';@@ -38,6 +39,7 @@ export const MeetingParticipantItem = ({onLeave,participant}: Props) => {+ const { t } = useTranslation();const isAudioMuted = useSelector(getIsParticipantAudioMuted(participant));const isVideoMuted = useSelector(getIsParticipantVideoMuted(participant));@@ -49,7 +51,9 @@ export const MeetingParticipantItem = ({onLeave = { onLeave }participant = { participant }videoMuteState = { isVideoMuted ? MediaState.Muted : MediaState.Unmuted }>- <ParticipantActionEllipsis onClick = { onContextMenu } />+ <ParticipantActionEllipsis+ aria-label = { t('MeetingParticipantItem.ParticipantActionEllipsis.options') }+ onClick = { onContextMenu } /></ParticipantItem>);};diff --git a/react/features/participants-pane/components/ParticipantsPane.js b/react/features/participants-pane/components/ParticipantsPane.jsindex efb4b07835..632fb67871 100644--- a/react/features/participants-pane/components/ParticipantsPane.js+++ b/react/features/participants-pane/components/ParticipantsPane.js@@ -30,6 +30,12 @@ export const ParticipantsPane = () => {const { t } = useTranslation();const closePane = useCallback(() => dispatch(close(), [ dispatch ]));+ const closePaneKeyPress = useCallback(e => {+ if (closePane && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ closePane();+ }+ }, [ closePane ]);const muteAll = useCallback(() => dispatch(openDialog(MuteEveryoneDialog)), [ dispatch ]);return (@@ -41,7 +47,12 @@ export const ParticipantsPane = () => {) }><div className = 'participants_pane-content'><Header>- <Close onClick = { closePane } />+ <Close+ aria-label = { t('participantsPane.close', 'Close') }+ onClick = { closePane }+ onKeyPress = { closePaneKeyPress }+ role = 'button'+ tabIndex = { 0 } /></Header><Container><LobbyParticipantList />diff --git a/react/features/prejoin/components/Prejoin.js b/react/features/prejoin/components/Prejoin.jsindex f4b316ffb9..b1bc773da0 100644--- a/react/features/prejoin/components/Prejoin.js+++ b/react/features/prejoin/components/Prejoin.js@@ -183,6 +183,9 @@ class Prejoin extends Component<Props, State> {this._onDropdownClose = this._onDropdownClose.bind(this);this._onOptionsClick = this._onOptionsClick.bind(this);this._setName = this._setName.bind(this);+ this._onJoinConferenceWithoutAudioKeyPress = this._onJoinConferenceWithoutAudioKeyPress.bind(this);+ this._showDialogKeyPress = this._showDialogKeyPress.bind(this);+ this._onJoinKeyPress = this._onJoinKeyPress.bind(this);}_onJoinButtonClick: () => void;@@ -205,6 +208,22 @@ class Prejoin extends Component<Props, State> {this.props.joinConference();}+ _onJoinKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onJoinKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._onJoinButtonClick();+ }+ }+_onToggleButtonClick: () => void;/**@@ -283,6 +302,40 @@ class Prejoin extends Component<Props, State> {this._onDropdownClose();}+ _showDialogKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _showDialogKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ this._showDialog();+ }+ }++ _onJoinConferenceWithoutAudioKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onJoinConferenceWithoutAudioKeyPress(e) {+ if (this.props.joinConferenceWithoutAudio+ && (e.key === ' '+ || e.key === 'Enter')) {+ e.preventDefault();+ this.props.joinConferenceWithoutAudio();+ }+ }+/*** Implements React's {@link Component#render()}.*@@ -305,7 +358,8 @@ class Prejoin extends Component<Props, State> {visibleButtons} = this.props;- const { _closeDialog, _onDropdownClose, _onJoinButtonClick, _onOptionsClick, _setName, _showDialog } = this;+ const { _closeDialog, _onDropdownClose, _onJoinButtonClick, _onJoinKeyPress, _showDialogKeyPress,+ _onJoinConferenceWithoutAudioKeyPress, _onOptionsClick, _setName, _showDialog } = this;const { showJoinByPhoneButtons, showError } = this.state;return (@@ -322,10 +376,16 @@ class Prejoin extends Component<Props, State> {{showJoinActions && (<div className = 'prejoin-input-area-container'><div className = 'prejoin-input-area'>+ <label+ className = 'prejoin-input-area-label'+ htmlFor = { 'Prejoin-input-field-id' } >+ { t('dialog.enterDisplayNameToJoin') }</label><InputField+ autoComplete = { 'name' }autoFocus = { true }className = { showError ? 'error' : '' }hasError = { showError }+ id = { 'Prejoin-input-field-id' }onChange = { _setName }onSubmit = { joinConference }placeHolder = { t('dialog.enterDisplayName') }@@ -341,7 +401,10 @@ class Prejoin extends Component<Props, State> {<divclassName = 'prejoin-preview-dropdown-btn'data-testid = 'prejoin.joinWithoutAudio'- onClick = { joinConferenceWithoutAudio }>+ onClick = { joinConferenceWithoutAudio }+ onKeyPress = { _onJoinConferenceWithoutAudioKeyPress }+ role = 'button'+ tabIndex = { 0 }><IconclassName = 'prejoin-preview-dropdown-icon'size = { 24 }@@ -350,7 +413,10 @@ class Prejoin extends Component<Props, State> {</div>{hasJoinByPhoneButton && <divclassName = 'prejoin-preview-dropdown-btn'- onClick = { _showDialog }>+ onClick = { _showDialog }+ onKeyPress = { _showDialogKeyPress }+ role = 'button'+ tabIndex = { 0 }><IconclassName = 'prejoin-preview-dropdown-icon'data-testid = 'prejoin.joinByPhone'@@ -363,9 +429,15 @@ class Prejoin extends Component<Props, State> {onClose = { _onDropdownClose }><ActionButtonOptionsIcon = { showJoinByPhoneButtons ? IconArrowUp : IconArrowDown }+ ariaDropDownLabel = { t('prejoin.joinWithoutAudio') }+ ariaLabel = { t('prejoin.joinMeeting') }+ ariaPressed = { showJoinByPhoneButtons }hasOptions = { true }onClick = { _onJoinButtonClick }+ onKeyPress = { _onJoinKeyPress }onOptionsClick = { _onOptionsClick }+ role = 'button'+ tabIndex = { 0 }testId = 'prejoin.joinMeeting'type = 'primary'>{ t('prejoin.joinMeeting') }diff --git a/react/features/prejoin/components/country-picker/CountryPicker.js b/react/features/prejoin/components/country-picker/CountryPicker.jsindex 5cfc5e36bf..b7ded1fe67 100644--- a/react/features/prejoin/components/country-picker/CountryPicker.js+++ b/react/features/prejoin/components/country-picker/CountryPicker.js@@ -172,9 +172,7 @@ class CountryPicker extends PureComponent<Props, State> {* @param {Object} e - The synthetic event.* @returns {void}*/- _onCountrySelectorClick(e) {- e.stopPropagation();-+ _onCountrySelectorClick() {this.setState({isOpen: !this.setState.isOpen});@@ -215,7 +213,8 @@ class CountryPicker extends PureComponent<Props, State> {* @returns {void}*/_onKeyPress(e) {- if (e.key === 'Enter') {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();this.props.onSubmit();}}diff --git a/react/features/prejoin/components/country-picker/CountrySelector.js b/react/features/prejoin/components/country-picker/CountrySelector.jsindex e5ba950a6f..ee0deac92b 100644--- a/react/features/prejoin/components/country-picker/CountrySelector.js+++ b/react/features/prejoin/components/country-picker/CountrySelector.js@@ -1,6 +1,6 @@// @flow-import React from 'react';+import React, { useCallback } from 'react';import { Icon, IconArrowDown } from '../../../base/icons';@@ -23,10 +23,18 @@ type Props = {* @returns {ReactElement}*/function CountrySelector({ country: { code, dialCode }, onClick }: Props) {+ const onKeyPressHandler = useCallback(e => {+ if (onClick && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ onClick();+ }+ }, [ onClick ]);+return (<divclassName = 'cpick-selector'- onClick = { onClick }>+ onClick = { onClick }+ onKeyPress = { onKeyPressHandler }><div className = { `prejoin-dialog-flag iti-flag ${code}` } /><span>{`+${dialCode}`}</span><Icondiff --git a/react/features/prejoin/components/dialogs/CallingDialog.js b/react/features/prejoin/components/dialogs/CallingDialog.jsindex eb6d6c1495..0250b9f503 100644--- a/react/features/prejoin/components/dialogs/CallingDialog.js+++ b/react/features/prejoin/components/dialogs/CallingDialog.js@@ -50,6 +50,7 @@ function CallingDialog(props: Props) {<IconclassName = 'prejoin-dialog-icon'onClick = { onClose }+ role = 'button'size = { 24 }src = { IconClose } /></div>diff --git a/react/features/prejoin/components/dialogs/DialInDialog.js b/react/features/prejoin/components/dialogs/DialInDialog.jsindex ca6fa1eabe..9c54efceb4 100644--- a/react/features/prejoin/components/dialogs/DialInDialog.js+++ b/react/features/prejoin/components/dialogs/DialInDialog.js@@ -73,6 +73,7 @@ function DialinDialog(props: Props) {<IconclassName = 'prejoin-dialog-icon prejoin-dialog-dialin-icon'onClick = { onBack }+ role = 'button'size = { 24 }src = { IconArrowLeft } /><div className = 'prejoin-dialog-title'>diff --git a/react/features/prejoin/components/dialogs/DialOutDialog.js b/react/features/prejoin/components/dialogs/DialOutDialog.jsindex 2f2f66e1b4..eecaca4b64 100644--- a/react/features/prejoin/components/dialogs/DialOutDialog.js+++ b/react/features/prejoin/components/dialogs/DialOutDialog.js@@ -50,6 +50,7 @@ function DialOutDialog(props: Props) {<IconclassName = 'prejoin-dialog-icon'onClick = { onClose }+ role = 'button'size = { 24 }src = { IconClose } /></div>diff --git a/react/features/prejoin/components/preview/DeviceStatus.js b/react/features/prejoin/components/preview/DeviceStatus.jsindex c17fb045fe..12f5a0c951 100644--- a/react/features/prejoin/components/preview/DeviceStatus.js+++ b/react/features/prejoin/components/preview/DeviceStatus.js@@ -56,12 +56,19 @@ function DeviceStatus({ deviceStatusType, deviceStatusText, rawError, t }: Propsconst { src, className } = iconMap[deviceStatusType];return (- <div className = { `prejoin-preview-status ${className}` }>+ <div+ className = { `prejoin-preview-status ${className}` }+ role = 'alert'+ tabIndex = { -1 }><IconclassName = 'prejoin-preview-icon'size = { 16 }src = { src } />- <span className = 'prejoin-preview-error-desc'>{t(deviceStatusText)}</span>+ <span+ className = 'prejoin-preview-error-desc'+ role = 'heading'>+ {t(deviceStatusText)}+ </span>{ rawError && <span>{ rawError }</span> }diff --git a/react/features/recent-list/components/AbstractRecentList.js b/react/features/recent-list/components/AbstractRecentList.jsindex f61e3a0050..9f7004efb4 100644--- a/react/features/recent-list/components/AbstractRecentList.js+++ b/react/features/recent-list/components/AbstractRecentList.js@@ -71,13 +71,18 @@ export default class AbstractRecentList<P: Props> extends AbstractPage<P> {*/_getRenderListEmptyComponent() {const { t } = this.props;+ const descriptionId = 'meetings-list-empty-description';return (<Container+ aria-describedby = { descriptionId }+ aria-label = { t('welcomepage.recentList') }className = 'meetings-list-empty'+ role = 'region'style = { styles.emptyListContainer }><TextclassName = 'description'+ id = { descriptionId }style = { styles.emptyListText }>{ t('welcomepage.recentListEmpty') }</Text>diff --git a/react/features/recording/components/LiveStream/web/StreamKeyForm.js b/react/features/recording/components/LiveStream/web/StreamKeyForm.jsindex e35d93eba4..61921bb02e 100644--- a/react/features/recording/components/LiveStream/web/StreamKeyForm.js+++ b/react/features/recording/components/LiveStream/web/StreamKeyForm.js@@ -27,6 +27,7 @@ class StreamKeyForm extends AbstractStreamKeyForm<Props> {// Bind event handlers so they are only bound once per instance.this._onOpenHelp = this._onOpenHelp.bind(this);+ this._onOpenHelpKeyPress = this._onOpenHelpKeyPress.bind(this);}/**@@ -63,8 +64,12 @@ class StreamKeyForm extends AbstractStreamKeyForm<Props> {}{ this.helpURL? <a+ aria-label = { t('liveStreaming.streamIdHelp') }className = 'helper-link'- onClick = { this._onOpenHelp }>+ onClick = { this._onOpenHelp }+ onKeyPress = { this._onOpenHelpKeyPress }+ role = 'link'+ tabIndex = { 0 }>{ t('liveStreaming.streamIdHelp') }</a>: null@@ -103,6 +108,24 @@ class StreamKeyForm extends AbstractStreamKeyForm<Props> {_onOpenHelp() {window.open(this.helpURL, '_blank', 'noopener');}++ _onOpenHelpKeyPress: () => void++ /**+ * Opens a new tab with information on how to manually locate a YouTube+ * broadcast stream key.+ *+ * @param {Object} e - The key event to handle.+ *+ * @private+ * @returns {void}+ */+ _onOpenHelpKeyPress(e) {+ if (e.key === ' ') {+ e.preventDefault();+ this._onOpenHelp();+ }+ }}export default translate(StreamKeyForm);diff --git a/react/features/recording/components/LiveStream/web/StreamKeyPicker.js b/react/features/recording/components/LiveStream/web/StreamKeyPicker.jsindex 3340b5b866..9d98c1be87 100644--- a/react/features/recording/components/LiveStream/web/StreamKeyPicker.js+++ b/react/features/recording/components/LiveStream/web/StreamKeyPicker.js@@ -111,15 +111,9 @@ class StreamKeyPicker extends PureComponent<Props, State> {const dropdownItems= broadcasts.map(broadcast => (<DropdownItem+ data-streamid = { broadcast.boundStreamID }key = { broadcast.boundStreamID }-- // eslint-disable-next-line react/jsx-no-bind- onClick = {- e => {- e.stopPropagation();- this._onSelect(broadcast.boundStreamID);- }- }>+ onClick = { this._onSelect }>{ broadcast.title }</DropdownItem>));const selected@@ -188,12 +182,14 @@ class StreamKeyPicker extends PureComponent<Props, State> {/*** Callback invoked when an item has been clicked in the dropdown menu.*- * @param {Object} boundStreamID - The bound stream ID for the selected- * broadcast.+ * @param {Object} e - The key event to handle.+ ** @returns {void}*/- _onSelect(boundStreamID) {- this.props.onBroadcastSelected(boundStreamID);+ _onSelect(e) {+ const streamId = e.currentTarget.getAttribute('data-streamid');++ this.props.onBroadcastSelected(streamId);}}diff --git a/react/features/security/components/security-dialog/web/PasswordForm.js b/react/features/security/components/security-dialog/web/PasswordForm.jsindex 394d163ff7..b02b9dedc4 100644--- a/react/features/security/components/security-dialog/web/PasswordForm.js+++ b/react/features/security/components/security-dialog/web/PasswordForm.js@@ -88,7 +88,7 @@ class PasswordForm extends Component<Props, State> {this._onEnteredPasswordChange= this._onEnteredPasswordChange.bind(this);this._onPasswordSubmit = this._onPasswordSubmit.bind(this);- this._onKeyDown = this._onKeyDown.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);}/**@@ -133,9 +133,10 @@ class PasswordForm extends Component<Props, State> {return (<formclassName = 'info-password-form'- onKeyDown = { this._onKeyDown }+ onKeyPress = { this._onKeyPress }onSubmit = { this._onPasswordSubmit }><input+ aria-label = { this.props.t('info.addPassword') }autoFocus = { true }className = 'info-password-input'maxLength = { this.props.passwordNumberOfDigits }@@ -198,7 +199,7 @@ class PasswordForm extends Component<Props, State> {this.props.onSubmit(this.state.enteredPassword);}- _onKeyDown: (Object) => void;+ _onKeyPress: (Object) => void;/*** Stops the the EnterKey for propagation in order to prevent the dialog@@ -208,7 +209,7 @@ class PasswordForm extends Component<Props, State> {* @private* @returns {void}*/- _onKeyDown(event) {+ _onKeyPress(event) {if (event.key === 'Enter') {event.stopPropagation();}diff --git a/react/features/security/components/security-dialog/web/PasswordSection.js b/react/features/security/components/security-dialog/web/PasswordSection.jsindex af7e50b503..a77ac2ad4f 100644--- a/react/features/security/components/security-dialog/web/PasswordSection.js+++ b/react/features/security/components/security-dialog/web/PasswordSection.js@@ -132,6 +132,67 @@ function PasswordSection({copyText(password);}+ /**+ * Toggles whether or not the password should currently be shown as being+ * edited locally.+ *+ * @param {Object} e - The key event to handle.+ *+ * @private+ * @returns {void}+ */+ function onTogglePasswordEditStateKeyPressHandler(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ onTogglePasswordEditState();+ }+ }++ /**+ * Method to remotely submit the password from outside of the password form.+ *+ * @param {Object} e - The key event to handle.+ *+ * @private+ * @returns {void}+ */+ function onPasswordSaveKeyPressHandler(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ onPasswordSave();+ }+ }++ /**+ * Callback invoked to unlock the current JitsiConference.+ *+ * @param {Object} e - The key event to handle.+ *+ * @private+ * @returns {void}+ */+ function onPasswordRemoveKeyPressHandler(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ onPasswordRemove();+ }+ }++ /**+ * Copies the password to the clipboard.+ *+ * @param {Object} e - The key event to handle.+ *+ * @private+ * @returns {void}+ */+ function onPasswordCopyKeyPressHandler(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ onPasswordCopy();+ }+ }+/*** Method that renders the password action(s) based on the current* locked-status of the conference.@@ -146,8 +207,18 @@ function PasswordSection({if (passwordEditEnabled) {return (<>- <a onClick = { onTogglePasswordEditState }>{ t('dialog.Cancel') }</a>- <a onClick = { onPasswordSave }>{ t('dialog.add') }</a>+ <a+ aria-label = { t('dialog.Cancel') }+ onClick = { onTogglePasswordEditState }+ onKeyPress = { onTogglePasswordEditStateKeyPressHandler }+ role = 'button'+ tabIndex = { 0 }>{ t('dialog.Cancel') }</a>+ <a+ aria-label = { t('dialog.add') }+ onClick = { onPasswordSave }+ onKeyPress = { onPasswordSaveKeyPressHandler }+ role = 'button'+ tabIndex = { 0 }>{ t('dialog.add') }</a></>);}@@ -156,15 +227,23 @@ function PasswordSection({return (<><a+ aria-label = { t('dialog.Remove') }className = 'remove-password'- onClick = { onPasswordRemove }>{ t('dialog.Remove') }</a>+ onClick = { onPasswordRemove }+ onKeyPress = { onPasswordRemoveKeyPressHandler }+ role = 'button'+ tabIndex = { 0 }>{ t('dialog.Remove') }</a>{// There are cases like lobby and grant moderator when password is not availablepassword ? <><a+ aria-label = { t('dialog.copy') }className = 'copy-password'- onClick = { onPasswordCopy }>{ t('dialog.copy') }</a>+ onClick = { onPasswordCopy }+ onKeyPress = { onPasswordCopyKeyPressHandler }+ role = 'button'+ tabIndex = { 0 }>{ t('dialog.copy') }</a></> : null}</>@@ -173,8 +252,12 @@ function PasswordSection({return (<a+ aria-label = { t('info.addPassword') }className = 'add-password'- onClick = { onTogglePasswordEditState }>{ t('info.addPassword') }</a>+ onClick = { onTogglePasswordEditState }+ onKeyPress = { onTogglePasswordEditStateKeyPressHandler }+ role = 'button'+ tabIndex = { 0 }>{ t('info.addPassword') }</a>);}diff --git a/react/features/security/components/security-dialog/web/SecurityDialog.js b/react/features/security/components/security-dialog/web/SecurityDialog.jsindex 98aad974e1..c3c15ccae8 100644--- a/react/features/security/components/security-dialog/web/SecurityDialog.js+++ b/react/features/security/components/security-dialog/web/SecurityDialog.js@@ -4,7 +4,6 @@ import React, { useState, useEffect } from 'react';import { setPassword as setPass } from '../../../../base/conference';import { Dialog } from '../../../../base/dialog';-import { translate } from '../../../../base/i18n';import { isLocalParticipantModerator } from '../../../../base/participants';import { connect } from '../../../../base/redux';import { E2EESection } from '../../../../e2ee/components';@@ -49,12 +48,7 @@ type Props = {/*** Action that sets the conference password.*/- setPassword: Function,-- /**- * Invoked to obtain translated strings.- */- t: Function+ setPassword: Function};/**@@ -140,4 +134,4 @@ function mapStateToProps(state) {const mapDispatchToProps = { setPassword: setPass };-export default translate(connect(mapStateToProps, mapDispatchToProps)(SecurityDialog));+export default connect(mapStateToProps, mapDispatchToProps)(SecurityDialog);diff --git a/react/features/settings/components/web/MoreTab.js b/react/features/settings/components/web/MoreTab.jsindex b2f066168e..e0a5a8e721 100644--- a/react/features/settings/components/web/MoreTab.js+++ b/react/features/settings/components/web/MoreTab.js@@ -1,5 +1,4 @@// @flow-import { Checkbox } from '@atlaskit/checkbox';import DropdownMenu, {DropdownItem,@@ -7,6 +6,7 @@ import DropdownMenu, {} from '@atlaskit/dropdown-menu';import React from 'react';+import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut';import { AbstractDialogTab } from '../../../base/dialog';import type { Props as AbstractDialogTabProps } from '../../../base/dialog';import { translate } from '../../../base/i18n';@@ -59,6 +59,7 @@ export type Props = {*/showPrejoinPage: boolean,+/*** Whether or not the user has selected the Start Audio Muted feature to be* enabled.@@ -110,6 +111,12 @@ class MoreTab extends AbstractDialogTab<Props, State> {// Bind event handler so it is only bound once for every instance.this._onLanguageDropdownOpenChange= this._onLanguageDropdownOpenChange.bind(this);+ this._onLanguageItemSelect = this._onLanguageItemSelect.bind(this);+ this._onStartAudioMutedChanged = this._onStartAudioMutedChanged.bind(this);+ this._onStartVideoMutedChanged = this._onStartVideoMutedChanged.bind(this);+ this._onFollowMeEnabledChanged = this._onFollowMeEnabledChanged.bind(this);+ this._onShowPrejoinPageChanged = this._onShowPrejoinPageChanged.bind(this);+ this._onKeyboardShortcutEnableChanged = this._onKeyboardShortcutEnableChanged.bind(this);}/**@@ -126,6 +133,9 @@ class MoreTab extends AbstractDialogTab<Props, State> {content.push(this._renderPrejoinScreenSettings());}+ content.push(this._renderKeyboardShortcutCheckbox());++if (showModeratorSettings) {content.push(this._renderModeratorSettings());}@@ -150,6 +160,92 @@ class MoreTab extends AbstractDialogTab<Props, State> {this.setState({ isLanguageSelectOpen: isOpen });}+ _onLanguageItemSelect: (Object) => void;++ /**+ * Callback invoked to select a language from select dropdown.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onLanguageItemSelect(e) {+ const language = e.currentTarget.getAttribute('data-language');++ super._onChange({ currentLanguage: language });+ }++ _onStartAudioMutedChanged: (Object) => void;++ /**+ * Callback invoked to select if conferences should start+ * with audio muted.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onStartAudioMutedChanged({ target: { checked } }) {+ super._onChange({ startAudioMuted: checked });+ }++ _onStartVideoMutedChanged: (Object) => void;++ /**+ * Callback invoked to select if conferences should start+ * with video disabled.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onStartVideoMutedChanged({ target: { checked } }) {+ super._onChange({ startVideoMuted: checked });+ }++ _onFollowMeEnabledChanged: (Object) => void;++ /**+ * Callback invoked to select if follow-me mode+ * should be activated.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onFollowMeEnabledChanged({ target: { checked } }) {+ super._onChange({ followMeEnabled: checked });+ }++ _onShowPrejoinPageChanged: (Object) => void;++ /**+ * Callback invoked to select if the lobby+ * should be shown.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onShowPrejoinPageChanged({ target: { checked } }) {+ super._onChange({ showPrejoinPage: checked });+ }++ _onKeyboardShortcutEnableChanged: (Object) => void;++ /**+ * Callback invoked to select if global keyboard shortcuts+ * should be enabled.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyboardShortcutEnableChanged({ target: { checked } }) {+ keyboardShortcut.enable(checked);+ super._onChange({ keyboardShortcutEnable: checked });+ }+/*** Returns the menu item for changing displayed language.*@@ -166,15 +262,9 @@ class MoreTab extends AbstractDialogTab<Props, State> {const languageItems= languages.map(language => (<DropdownItem+ data-language = { language }key = { language }-- // eslint-disable-next-line react/jsx-no-bind- onClick = {- e => {- e.stopPropagation();- super._onChange({ currentLanguage: language });- }- }>+ onClick = { this._onLanguageItemSelect }>{ t(`languages:${language}`) }</DropdownItem>));@@ -182,9 +272,9 @@ class MoreTab extends AbstractDialogTab<Props, State> {<divclassName = 'settings-sub-pane language-settings'key = 'language'>- <div className = 'mock-atlaskit-label'>+ <h2 className = 'mock-atlaskit-label'>{ t('settings.language') }- </div>+ </h2><div className = 'dropdown-menu'><TouchmoveHack isModal = { true }><DropdownMenu@@ -227,37 +317,25 @@ class MoreTab extends AbstractDialogTab<Props, State> {<divclassName = 'settings-sub-pane'key = 'moderator'>- <div className = 'mock-atlaskit-label'>+ <h2 className = 'mock-atlaskit-label'>{ t('settings.moderator') }- </div>+ </h2><CheckboxisChecked = { startAudioMuted }label = { t('settings.startAudioMuted') }name = 'start-audio-muted'- // eslint-disable-next-line react/jsx-no-bind- onChange = {- ({ target: { checked } }) =>- super._onChange({ startAudioMuted: checked })- } />+ onChange = { this._onStartAudioMutedChanged } /><CheckboxisChecked = { startVideoMuted }label = { t('settings.startVideoMuted') }name = 'start-video-muted'- // eslint-disable-next-line react/jsx-no-bind- onChange = {- ({ target: { checked } }) =>- super._onChange({ startVideoMuted: checked })- } />+ onChange = { this._onStartVideoMutedChanged } /><CheckboxisChecked = { followMeEnabled && !followMeActive }isDisabled = { followMeActive }label = { t('settings.followMe') }name = 'follow-me'- // eslint-disable-next-line react/jsx-no-bind- onChange = {- ({ target: { checked } }) =>- super._onChange({ followMeEnabled: checked })- } />+ onChange = { this._onFollowMeEnabledChanged } /></div>);}@@ -275,18 +353,39 @@ class MoreTab extends AbstractDialogTab<Props, State> {<divclassName = 'settings-sub-pane'key = 'prejoin-screen'>- <div className = 'mock-atlaskit-label'>+ <h2 className = 'mock-atlaskit-label'>{ t('prejoin.premeeting') }- </div>+ </h2><CheckboxisChecked = { showPrejoinPage }label = { t('prejoin.showScreen') }name = 'show-prejoin-page'- // eslint-disable-next-line react/jsx-no-bind- onChange = {- ({ target: { checked } }) =>- super._onChange({ showPrejoinPage: checked })- } />+ onChange = { this._onShowPrejoinPageChanged } />+ </div>+ );+ }++ /**+ * Returns the React Element for keyboardShortcut settings.+ *+ * @private+ * @returns {ReactElement}+ */+ _renderKeyboardShortcutCheckbox() {+ const { t } = this.props;++ return (+ <div+ className = 'settings-sub-pane'+ key = 'keyboard-shortcut'>+ <h2 className = 'mock-atlaskit-label'>+ { t('keyboardShortcuts.keyboardShortcuts') }+ </h2>+ <Checkbox+ isChecked = { keyboardShortcut.getEnabled() }+ label = { t('prejoin.keyboardShortcuts') }+ name = 'enable-keyboard-shortcuts'+ onChange = { this._onKeyboardShortcutEnableChanged } /></div>);}diff --git a/react/features/settings/components/web/ProfileTab.js b/react/features/settings/components/web/ProfileTab.jsindex 85d7adaddf..d07d3dc978 100644--- a/react/features/settings/components/web/ProfileTab.js+++ b/react/features/settings/components/web/ProfileTab.js@@ -70,6 +70,34 @@ class ProfileTab extends AbstractDialogTab<Props> {// Bind event handlers so they are only bound once for every instance.this._onAuthToggle = this._onAuthToggle.bind(this);+ this._onDisplayNameChange = this._onDisplayNameChange.bind(this);+ this._onEmailChange = this._onEmailChange.bind(this);+ }++ _onDisplayNameChange: (Object) => void;++ /**+ * Changes display name of the user.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onDisplayNameChange({ target: { value } }) {+ super._onChange({ displayName: value });+ }++ _onEmailChange: (Object) => void;++ /**+ * Changes email of the user.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onEmailChange({ target: { value } }) {+ super._onChange({ email: value });}/**@@ -91,15 +119,11 @@ class ProfileTab extends AbstractDialogTab<Props> {<div className = 'profile-edit'><div className = 'profile-edit-field'><FieldTextStateless- autoFocus = { true }+ autoComplete = 'name'compact = { true }id = 'setDisplayName'label = { t('profile.setDisplayNameLabel') }- // eslint-disable-next-line react/jsx-no-bind- onChange = {- ({ target: { value } }) =>- super._onChange({ displayName: value })- }+ onChange = { this._onDisplayNameChange }placeholder = { t('settings.name') }shouldFitContainer = { true }type = 'text'@@ -110,11 +134,7 @@ class ProfileTab extends AbstractDialogTab<Props> {compact = { true }id = 'setEmail'label = { t('profile.setEmailLabel') }- // eslint-disable-next-line react/jsx-no-bind- onChange = {- ({ target: { value } }) =>- super._onChange({ email: value })- }+ onChange = { this._onEmailChange }placeholder = { t('profile.setEmailInput') }shouldFitContainer = { true }type = 'text'@@ -163,9 +183,9 @@ class ProfileTab extends AbstractDialogTab<Props> {return (<div>- <div className = 'mock-atlaskit-label'>+ <h2 className = 'mock-atlaskit-label'>{ t('toolbar.authenticate') }- </div>+ </h2>{ authLogin&& <div className = 'auth-name'>{ t('settings.loggedIn', { name: authLogin }) }diff --git a/react/features/settings/components/web/audio/AudioSettingsContent.js b/react/features/settings/components/web/audio/AudioSettingsContent.jsindex 3ac9506dd9..65cb4ac1b6 100644--- a/react/features/settings/components/web/audio/AudioSettingsContent.js+++ b/react/features/settings/components/web/audio/AudioSettingsContent.js@@ -85,6 +85,10 @@ type State = {*/class AudioSettingsContent extends Component<Props, State> {_componentWasUnmounted: boolean;+ _audioContentRef: Object;+ microphoneHeaderId = 'microphone_settings_header';+ speakerHeaderId = 'speaker_settings_header';+/*** Initializes a new {@code AudioSettingsContent} instance.@@ -97,6 +101,8 @@ class AudioSettingsContent extends Component<Props, State> {this._onMicrophoneEntryClick = this._onMicrophoneEntryClick.bind(this);this._onSpeakerEntryClick = this._onSpeakerEntryClick.bind(this);+ this._onEscClick = this._onEscClick.bind(this);+ this._audioContentRef = React.createRef();this.state = {audioTracks: props.microphoneDevices.map(({ deviceId, label }) => {@@ -109,6 +115,21 @@ class AudioSettingsContent extends Component<Props, State> {})};}+ _onEscClick: (KeyboardEvent) => void;++ /**+ * Click handler for the speaker entries.+ *+ * @param {KeyboardEvent} event - Esc key click to close the popup.+ * @returns {void}+ */+ _onEscClick(event) {+ if (event.key === 'Escape') {+ event.preventDefault();+ event.stopPropagation();+ this._audioContentRef.current.style.display = 'none';+ }+ }_onMicrophoneEntryClick: (string) => void;@@ -139,10 +160,11 @@ class AudioSettingsContent extends Component<Props, State> {** @param {Object} data - An object with the deviceId, jitsiTrack & label of the microphone.* @param {number} index - The index of the element, used for creating a key.+ * @param {length} length - The length of the microphone list.* @param {Function} t - The translation function.* @returns {React$Node}*/- _renderMicrophoneEntry(data, index, t) {+ _renderMicrophoneEntry(data, index, length, t) {const { deviceId, jitsiTrack, hasError } = data;const label = transformDefaultDeviceLabel(deviceId, data.label, t);const isSelected = deviceId === this.props.currentMicDeviceId;@@ -151,9 +173,12 @@ class AudioSettingsContent extends Component<Props, State> {<MicrophoneEntrydeviceId = { deviceId }hasError = { hasError }+ index = { index }isSelected = { isSelected }jitsiTrack = { jitsiTrack }key = { `me-${index}` }+ length = { length }+ listHeaderId = { this.microphoneHeaderId }onClick = { this._onMicrophoneEntryClick }>{label}</MicrophoneEntry>@@ -165,19 +190,24 @@ class AudioSettingsContent extends Component<Props, State> {** @param {Object} data - An object with the deviceId and label of the speaker.* @param {number} index - The index of the element, used for creating a key.+ * @param {length} length - The length of the speaker list.* @param {Function} t - The translation function.* @returns {React$Node}*/- _renderSpeakerEntry(data, index, t) {+ _renderSpeakerEntry(data, index, length, t) {const { deviceId } = data;const label = transformDefaultDeviceLabel(deviceId, data.label, t);const key = `se-${index}`;+ const isSelected = deviceId === this.props.currentOutputDeviceId;return (<SpeakerEntrydeviceId = { deviceId }- isSelected = { deviceId === this.props.currentOutputDeviceId }+ index = { index }+ isSelected = { isSelected }key = { key }+ length = { length }+ listHeaderId = { this.speakerHeaderId }onClick = { this._onSpeakerEntryClick }>{label}</SpeakerEntry>@@ -264,25 +294,47 @@ class AudioSettingsContent extends Component<Props, State> {return (<div>- <div className = 'audio-preview-content'>- <AudioSettingsHeader- IconComponent = { IconMicrophoneHollow }- text = { t('settings.microphones') } />- {this.state.audioTracks.map((data, i) =>- this._renderMicrophoneEntry(data, i, t),- )}+ <div+ aria-labelledby = 'audio-settings-button'+ className = 'audio-preview-content'+ id = 'audio-settings-dialog'+ onKeyDown = { this._onEscClick }+ ref = { this._audioContentRef }+ role = 'menu'+ tabIndex = { -1 }>+ <div role = 'menuitem'>+ <AudioSettingsHeader+ IconComponent = { IconMicrophoneHollow }+ id = { this.microphoneHeaderId }+ text = { t('settings.microphones') } />+ <ul+ aria-labelledby = 'microphone_settings_header'+ className = 'audio-preview-content-ul'+ role = 'radiogroup'+ tabIndex = '-1'>+ {this.state.audioTracks.map((data, i) =>+ this._renderMicrophoneEntry(data, i, this.state.audioTracks.length, t),+ )}+ </ul>+ </div>{ outputDevices.length > 0 && (- <>+ <div role = 'menuitem'><hr className = 'audio-preview-hr' /><AudioSettingsHeaderIconComponent = { IconVolumeEmpty }+ id = { this.speakerHeaderId }text = { t('settings.speakers') } />- </>- )+ <ul+ aria-labelledby = 'speaker_settings_header'+ className = 'audio-preview-content-ul'+ role = 'radiogroup'+ tabIndex = '-1'>+ { outputDevices.map((data, i) =>+ this._renderSpeakerEntry(data, i, outputDevices.length, t),+ )}+ </ul>+ </div>)}- {outputDevices.map((data, i) =>- this._renderSpeakerEntry(data, i, t),- )}</div></div>);diff --git a/react/features/settings/components/web/audio/AudioSettingsEntry.js b/react/features/settings/components/web/audio/AudioSettingsEntry.jsindex 5331a0e918..ceeeae0387 100644--- a/react/features/settings/components/web/audio/AudioSettingsEntry.js+++ b/react/features/settings/components/web/audio/AudioSettingsEntry.js@@ -19,6 +19,11 @@ export type Props = {*/hasError?: boolean,+ /**+ * The id for the label, that contains the item text.+ */+ labelId?: string,+/*** Flag indicating the selection state.*/@@ -30,7 +35,9 @@ export type Props = {** @returns { ReactElement}*/-export default function AudioSettingsEntry({ children, hasError, isSelected }: Props) {+export default function AudioSettingsEntry(+ { children, hasError, labelId, isSelected }: Props) {+const className = `audio-preview-entry ${isSelected? 'audio-preview-entry--selected' : ''}`;@@ -43,7 +50,11 @@ export default function AudioSettingsEntry({ children, hasError, isSelected }: Psize = { 14 }src = { IconCheck } />)}- <span className = 'audio-preview-entry-text'>{children}</span>+ <span+ className = 'audio-preview-entry-text'+ id = { labelId }>+ {children}+ </span>{hasError && <IconclassName = 'audio-preview-icon audio-preview-icon--exclamation'size = { 16 }diff --git a/react/features/settings/components/web/audio/AudioSettingsHeader.js b/react/features/settings/components/web/audio/AudioSettingsHeader.jsindex d649dd9aed..837b58446b 100644--- a/react/features/settings/components/web/audio/AudioSettingsHeader.js+++ b/react/features/settings/components/web/audio/AudioSettingsHeader.js@@ -9,6 +9,11 @@ import { Icon } from '../../../../base/icons';*/type Props = {+ /**+ * The id used for the Header-text.+ */+ id?: string,+/*** The Icon used for the Header.*/@@ -25,15 +30,19 @@ type Props = {** @returns { ReactElement}*/-export default function AudioSettingsHeader({ IconComponent, text }: Props) {+export default function AudioSettingsHeader({ IconComponent, id, text }: Props) {return (- <div className = 'audio-preview-header'>+ <div+ className = 'audio-preview-header'+ role = 'heading'><div className = 'audio-preview-header-icon'>{ <Iconsize = { 20 }src = { IconComponent } />}</div>- <div className = 'audio-preview-header-text'>{text}</div>+ <div+ className = 'audio-preview-header-text'+ id = { id } >{text}</div></div>);}diff --git a/react/features/settings/components/web/audio/MicrophoneEntry.js b/react/features/settings/components/web/audio/MicrophoneEntry.jsindex 64f4b0a6cb..295ab8a5d3 100644--- a/react/features/settings/components/web/audio/MicrophoneEntry.js+++ b/react/features/settings/components/web/audio/MicrophoneEntry.js@@ -21,15 +21,27 @@ type Props = AudioSettingsEntryProps & {*/hasError?: boolean,+ /**+ * Flag indicating if there is a problem with the device.+ */+ index?: number,+/*** The audio track for the current entry.*/jitsiTrack: Object,+ /**+ * The length of the microphone list+ */+ length: number,++/*** Click handler for component.*/onClick: Function,+ listHeaderId: string}type State = {@@ -37,7 +49,7 @@ type State = {/*** The audio level.*/- level: number,+ level: number}/**@@ -60,6 +72,7 @@ export default class MicrophoneEntry extends Component<Props, State> {level: -1};this._onClick = this._onClick.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);this._updateLevel = this._updateLevel.bind(this);}@@ -74,6 +87,28 @@ export default class MicrophoneEntry extends Component<Props, State> {this.props.onClick(this.props.deviceId);}+ /**+ * Key pressed handler for the entry.+ *+ * @returns {void}+ */+ _onKeyPress: (KeyboardEvent) => void;++ /**+ * Key pressed handler for the entry.+ *+ * @param {Object} e - The event.+ * @private+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (e.key === ' ') {+ e.preventDefault();+ this.props.onClick(this.props.deviceId);+ }+ }+_updateLevel: (number) => void;/**@@ -150,15 +185,28 @@ export default class MicrophoneEntry extends Component<Props, State> {* @inheritdoc*/render() {- const { children, hasError, isSelected, jitsiTrack } = this.props;++ const { deviceId, children, hasError, index, isSelected, length, jitsiTrack, listHeaderId } = this.props;++ const deviceTextId: string = `choose_microphone${deviceId}`;++ const labelledby: string = `${listHeaderId} ${deviceTextId} `;return (- <div+ <li+ aria-checked = { isSelected }+ aria-labelledby = { labelledby }+ aria-posinset = { index }+ aria-setsize = { length }className = 'audio-preview-microphone'- onClick = { this._onClick }>+ onClick = { this._onClick }+ onKeyPress = { this._onKeyPress }+ role = 'radio'+ tabIndex = { 0 }><AudioSettingsEntryhasError = { hasError }- isSelected = { isSelected }>+ isSelected = { isSelected }+ labelId = { deviceTextId }>{children}</AudioSettingsEntry>{ Boolean(jitsiTrack) && <Meter@@ -166,7 +214,7 @@ export default class MicrophoneEntry extends Component<Props, State> {isDisabled = { hasError }level = { this.state.level } />}- </div>+ </li>);}}diff --git a/react/features/settings/components/web/audio/SpeakerEntry.js b/react/features/settings/components/web/audio/SpeakerEntry.jsindex 5a3da57e32..21c0eb2d16 100644--- a/react/features/settings/components/web/audio/SpeakerEntry.js+++ b/react/features/settings/components/web/audio/SpeakerEntry.js@@ -14,6 +14,7 @@ const TEST_SOUND_PATH = 'sounds/ring.wav';*/type Props = {+/*** The text label for the entry.*/@@ -24,6 +25,16 @@ type Props = {*/isSelected: boolean,+ /**+ * Flag controlling the selection state of the entry.+ */+ index: number,++ /**+ * Flag controlling the selection state of the entry.+ */+ length: number,+/*** The deviceId of the speaker.*/@@ -33,6 +44,7 @@ type Props = {* Click handler for the component.*/onClick: Function,+ listHeaderId: string};/**@@ -59,6 +71,7 @@ export default class SpeakerEntry extends Component<Props> {this.audioRef = React.createRef();this._onTestButtonClick = this._onTestButtonClick.bind(this);this._onClick = this._onClick.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);}_onClick: () => void;@@ -72,6 +85,24 @@ export default class SpeakerEntry extends Component<Props> {this.props.onClick(this.props.deviceId);}+ _onKeyPress: () => void;++ /**+ * Key pressed handler for the entry.+ *+ * @param {Object} e - The event.+ * @private+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (e.key === ' ') {+ e.preventDefault();+ this.props.onClick(this.props.deviceId);+ }+ }++_onTestButtonClick: Object => void;/**@@ -98,23 +129,35 @@ export default class SpeakerEntry extends Component<Props> {* @inheritdoc*/render() {- const { children, isSelected, deviceId } = this.props;+ const { children, isSelected, index, deviceId, length, listHeaderId } = this.props;+ const deviceTextId: string = `choose_speaker${deviceId}`;+ const labelledby: string = `${listHeaderId} ${deviceTextId} `;return (- <div+ <li+ aria-checked = { isSelected }+ aria-labelledby = { labelledby }+ aria-posinset = { index }+ aria-setsize = { length }className = 'audio-preview-speaker'- onClick = { this._onClick }>+ onClick = { this._onClick }+ onKeyPress = { this._onKeyPress }+ role = 'radio'+ tabIndex = { 0 }><AudioSettingsEntryisSelected = { isSelected }- key = { deviceId }>+ key = { deviceId }+ labelId = { deviceTextId }>{children}</AudioSettingsEntry>- <TestButton onClick = { this._onTestButtonClick } />+ <TestButton+ onClick = { this._onTestButtonClick }+ onKeyPress = { this._onTestButtonClick } /><audiopreload = 'auto'ref = { this.audioRef }src = { TEST_SOUND_PATH } />- </div>+ </li>);}}diff --git a/react/features/settings/components/web/audio/TestButton.js b/react/features/settings/components/web/audio/TestButton.jsindex 57eb500261..912b7d5d13 100644--- a/react/features/settings/components/web/audio/TestButton.js+++ b/react/features/settings/components/web/audio/TestButton.js@@ -8,6 +8,11 @@ type Props = {* Click handler for the button.*/onClick: Function,++ /**+ * keypress handler for the button.+ */+ onKeyPress: Function,};/**@@ -15,11 +20,14 @@ type Props = {** @returns { ReactElement}*/-export default function TestButton({ onClick }: Props) {+export default function TestButton({ onClick, onKeyPress }: Props) {return (<divclassName = 'audio-preview-test-button'- onClick = { onClick }>+ onClick = { onClick }+ onKeyPress = { onKeyPress }+ role = 'button'+ tabIndex = { 0 }>Test</div>);diff --git a/react/features/settings/components/web/video/VideoSettingsContent.js b/react/features/settings/components/web/video/VideoSettingsContent.jsindex d557fe28bf..6adc597b4d 100644--- a/react/features/settings/components/web/video/VideoSettingsContent.js+++ b/react/features/settings/components/web/video/VideoSettingsContent.js@@ -60,6 +60,7 @@ type State = {*/class VideoSettingsContent extends Component<Props, State> {_componentWasUnmounted: boolean;+ _videoContentRef: Object;/*** Initializes a new {@code VideoSettingsContent} instance.@@ -69,6 +70,8 @@ class VideoSettingsContent extends Component<Props, State> {*/constructor(props) {super(props);+ this._onEscClick = this._onEscClick.bind(this);+ this._videoContentRef = React.createRef();this.state = {trackData: new Array(props.videoDeviceIds.length).fill({@@ -76,6 +79,21 @@ class VideoSettingsContent extends Component<Props, State> {})};}+ _onEscClick: (KeyboardEvent) => void;++ /**+ * Click handler for the video entries.+ *+ * @param {KeyboardEvent} event - Esc key click to close the popup.+ * @returns {void}+ */+ _onEscClick(event) {+ if (event.key === 'Escape') {+ event.preventDefault();+ event.stopPropagation();+ this._videoContentRef.current.style.display = 'none';+ }+ }/*** Creates and updates the track data.@@ -136,12 +154,14 @@ class VideoSettingsContent extends Component<Props, State> {const isSelected = deviceId === currentCameraDeviceId;const key = `vp-${index}`;const className = 'video-preview-entry';+ const tabIndex = '0';if (error) {return (<divclassName = { className }- key = { key }>+ key = { key }+ tabIndex = { -1 } ><div className = 'video-preview-error'>{t(error)}</div></div>);@@ -149,18 +169,28 @@ class VideoSettingsContent extends Component<Props, State> {const props: Object = {className,- key+ key,+ tabIndex};const label = jitsiTrack && jitsiTrack.getTrackLabel();if (isSelected) {+ props['aria-checked'] = true;props.className = `${className} video-preview-entry--selected`;} else {props.onClick = this._onEntryClick(deviceId);+ props.onKeyPress = e => {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ props.onClick();+ }+ };}return (- <div { ...props }>+ <div+ { ...props }+ role = 'radio'><div className = 'video-preview-label'>{label && <div className = 'video-preview-label-container'><div className = 'video-preview-label-text'>@@ -215,10 +245,15 @@ class VideoSettingsContent extends Component<Props, State> {const { trackData } = this.state;return (- <div className = 'video-preview-container'>- <div className = 'video-preview'>- {trackData.map((data, i) => this._renderPreviewEntry(data, i))}- </div>+ <div+ aria-labelledby = 'video-settings-button'+ className = 'video-preview-container'+ id = 'video-settings-dialog'+ onKeyDown = { this._onEscClick }+ ref = { this._videoContentRef }+ role = 'radiogroup'+ tabIndex = '-1'>+ {trackData.map((data, i) => this._renderPreviewEntry(data, i))}</div>);}diff --git a/react/features/speaker-stats/components/SpeakerStatsItem.js b/react/features/speaker-stats/components/SpeakerStatsItem.jsindex c00ae615a0..efb3b021b4 100644--- a/react/features/speaker-stats/components/SpeakerStatsItem.js+++ b/react/features/speaker-stats/components/SpeakerStatsItem.js@@ -2,6 +2,8 @@import React, { Component } from 'react';+import { translate } from '../../base/i18n';+import TimeElapsed from './TimeElapsed';/**@@ -27,7 +29,12 @@ type Props = {/*** True if the participant is currently the dominant speaker.*/- isDominantSpeaker: boolean+ isDominantSpeaker: boolean,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -55,10 +62,14 @@ class SpeakerStatsItem extends Component<Props> {<div className = 'speaker-stats-item__status'><span className = { speakerStatusClass } /></div>- <div className = 'speaker-stats-item__name'>+ <div+ aria-label = { this.props.t('speakerStats.speakerStats') }+ className = 'speaker-stats-item__name'>{ this.props.displayName }</div>- <div className = 'speaker-stats-item__time'>+ <div+ aria-label = { this.props.t('speakerStats.speakerTime') }+ className = 'speaker-stats-item__time'><TimeElapsedtime = { this.props.dominantSpeakerTime } /></div>@@ -67,4 +78,4 @@ class SpeakerStatsItem extends Component<Props> {}}-export default SpeakerStatsItem;+export default translate(SpeakerStatsItem);diff --git a/react/features/toolbox/actions.web.js b/react/features/toolbox/actions.web.jsindex d1a2b8119d..b9210742db 100644--- a/react/features/toolbox/actions.web.js+++ b/react/features/toolbox/actions.web.js@@ -83,10 +83,13 @@ export function hideToolbox(force: boolean = false): Function {dispatch(clearToolboxTimeout());+ const focusSelector = '.toolbox-content-items:focus-within,.filmstrip:focus-within,.remotevideomenu:hover';+if (!force&& (hovered|| state['features/invite'].calleeInfoVisible- || state['features/chat'].isOpen)) {+ || state['features/chat'].isOpen+ || document.querySelector(focusSelector))) {dispatch(setToolboxTimeout(() => dispatch(hideToolbox()),diff --git a/react/features/toolbox/components/web/AudioSettingsButton.js b/react/features/toolbox/components/web/AudioSettingsButton.jsindex 1f8cb51334..3881eeacab 100644--- a/react/features/toolbox/components/web/AudioSettingsButton.js+++ b/react/features/toolbox/components/web/AudioSettingsButton.js@@ -9,6 +9,7 @@ import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';import { connect } from '../../../base/redux';import { ToolboxButtonWithIcon } from '../../../base/toolbox/components';import { AudioSettingsPopup, toggleAudioSettings } from '../../../settings';+import { getAudioSettingsVisibility } from '../../../settings/functions';import { isAudioSettingsButtonDisabled } from '../../functions';import AudioMuteButton from '../AudioMuteButton';@@ -38,7 +39,12 @@ type Props = {* Flag controlling the visibility of the button.* AudioSettings popup is disabled on mobile browsers.*/- visible: boolean+ visible: boolean,++ /**+ * Defines is popup is open+ */+ isOpen: boolean,};/**@@ -47,6 +53,32 @@ type Props = {* @returns {ReactElement}*/class AudioSettingsButton extends Component<Props> {+ /**+ * Initializes a new {@code AudioSettingsButton} instance.+ *+ * @inheritdoc+ */+ constructor(props: Props) {+ super(props);++ this._onEscClick = this._onEscClick.bind(this);+ }++ _onEscClick: (KeyboardEvent) => void;++ /**+ * Click handler for the more actions entries.+ *+ * @param {KeyboardEvent} event - Esc key click to close the popup.+ * @returns {void}+ */+ _onEscClick(event) {+ if (event.key === 'Escape' && this.props.isOpen) {+ event.preventDefault();+ event.stopPropagation();+ this.props.onAudioOptionsClick();+ }+ }/*** Implements React's {@link Component#render}.@@ -54,7 +86,7 @@ class AudioSettingsButton extends Component<Props> {* @inheritdoc*/render() {- const { hasPermissions, isDisabled, onAudioOptionsClick, t, visible } = this.props;+ const { hasPermissions, isDisabled, onAudioOptionsClick, visible, isOpen, t } = this.props;const settingsDisabled = !hasPermissions|| isDisabled|| !JitsiMeetJS.mediaDevices.isMultipleAudioInputSupported();@@ -62,10 +94,16 @@ class AudioSettingsButton extends Component<Props> {return visible ? (<AudioSettingsPopup><ToolboxButtonWithIcon+ ariaControls = 'audio-settings-dialog'+ ariaExpanded = { isOpen }+ ariaHasPopup = { true }+ ariaLabel = { t('toolbar.audioSettings') }icon = { IconArrowUp }iconDisabled = { settingsDisabled }+ iconId = 'audio-settings-button'iconTooltip = { t('toolbar.audioSettings') }- onIconClick = { onAudioOptionsClick }>+ onIconClick = { onAudioOptionsClick }+ onIconKeyDown = { this._onEscClick }><AudioMuteButton /></ToolboxButtonWithIcon></AudioSettingsPopup>@@ -85,6 +123,7 @@ function mapStateToProps(state) {return {hasPermissions: permissions.audio,isDisabled: isAudioSettingsButtonDisabled(state),+ isOpen: getAudioSettingsVisibility(state),visible: !isMobileBrowser()};}diff --git a/react/features/toolbox/components/web/Drawer.js b/react/features/toolbox/components/web/Drawer.jsindex d9c96c7d2d..bd0660a823 100644--- a/react/features/toolbox/components/web/Drawer.js+++ b/react/features/toolbox/components/web/Drawer.js@@ -2,6 +2,7 @@import React, { useEffect, useRef, useState } from 'react';+import { translate } from '../../../base/i18n';import { Icon, IconArrowUpWide, IconArrowDownWide } from '../../../base/icons';type Props = {@@ -24,7 +25,12 @@ type Props = {/**Function that hides the drawer.*/- onClose: Function+ onClose: Function,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -36,7 +42,8 @@ function Drawer({canExpand,children,isOpen,- onClose }: Props) {+ onClose,+ t }: Props) {const [ expanded, setExpanded ] = useState(false);const drawerRef: Object = useRef(null);@@ -69,6 +76,20 @@ function Drawer({setExpanded(!expanded);}+ /**+ * KeyPress handler for accessibility.+ *+ * @param {React.KeyboardEventHandler<HTMLDivElement>} e - The key event to handle.+ *+ * @returns {void}+ */+ function onKeyPress(e) {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ toggleExpanded();+ }+ }+return (isOpen ? (<div@@ -76,8 +97,14 @@ function Drawer({ref = { drawerRef }>{canExpand && (<div+ aria-expanded = { expanded }+ aria-label = { expanded ? t('toolbar.accessibilityLabel.collapse')+ : t('toolbar.accessibilityLabel.expand') }className = 'drawer-toggle'- onClick = { toggleExpanded }>+ onClick = { toggleExpanded }+ onKeyPress = { onKeyPress }+ role = 'button'+ tabIndex = { 0 }><Iconsize = { 24 }src = { expanded ? IconArrowDownWide : IconArrowUpWide } />@@ -89,4 +116,4 @@ function Drawer({);}-export default Drawer;+export default translate(Drawer);diff --git a/react/features/toolbox/components/web/OverflowMenuButton.js b/react/features/toolbox/components/web/OverflowMenuButton.jsindex f964012852..f032bee1a9 100644--- a/react/features/toolbox/components/web/OverflowMenuButton.js+++ b/react/features/toolbox/components/web/OverflowMenuButton.js@@ -17,6 +17,11 @@ import ToolbarButton from './ToolbarButton';*/type Props = {+ /**+ * ID of the menu that is controlled by this button.+ */+ ariaControls: String,+/*** A child React Element to display within {@code InlineDialog}.*/@@ -62,6 +67,23 @@ class OverflowMenuButton extends Component<Props> {this._onCloseDialog = this._onCloseDialog.bind(this);this._onToggleDialogVisibility= this._onToggleDialogVisibility.bind(this);+ this._onEscClick = this._onEscClick.bind(this);+ }++ _onEscClick: (KeyboardEvent) => void;++ /**+ * Click handler for the more actions entries.+ *+ * @param {KeyboardEvent} event - Esc key click to close the popup.+ * @returns {void}+ */+ _onEscClick(event) {+ if (event.key === 'Escape' && this.props.isOpen) {+ event.preventDefault();+ event.stopPropagation();+ this._onCloseDialog();+ }}/**@@ -110,14 +132,17 @@ class OverflowMenuButton extends Component<Props> {* @returns {ReactElement}*/_renderToolbarButton() {- const { isOpen, t } = this.props;+ const { ariaControls, isOpen, t } = this.props;return (<ToolbarButtonaccessibilityLabel ={ t('toolbar.accessibilityLabel.moreActions') }+ aria-controls = { ariaControls }+ aria-haspopup = 'true'icon = { IconHorizontalPoints }onClick = { this._onToggleDialogVisibility }+ onKeyDown = { this._onEscClick }toggled = { isOpen }tooltip = { t('toolbar.moreActions') } />);diff --git a/react/features/toolbox/components/web/OverflowMenuProfileItem.js b/react/features/toolbox/components/web/OverflowMenuProfileItem.jsindex b07fe3d02f..85bc8e442f 100644--- a/react/features/toolbox/components/web/OverflowMenuProfileItem.js+++ b/react/features/toolbox/components/web/OverflowMenuProfileItem.js@@ -55,6 +55,7 @@ class OverflowMenuProfileItem extends Component<Props> {// Bind event handler so it is only bound once for every instance.this._onClick = this._onClick.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);}/**@@ -79,7 +80,10 @@ class OverflowMenuProfileItem extends Component<Props> {<liaria-label = { t('toolbar.accessibilityLabel.profile') }className = { classNames }- onClick = { this._onClick }>+ onClick = { this._onClick }+ onKeyPress = { this._onKeyPress }+ role = 'menuitem'+ tabIndex = { 0 }><span className = 'overflow-menu-item-icon'><AvatarparticipantId = { _localParticipant.id }@@ -104,6 +108,22 @@ class OverflowMenuProfileItem extends Component<Props> {this.props.onClick();}}++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (!this.props._unclickable && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ this.props.onClick();+ }+ }}/**diff --git a/react/features/toolbox/components/web/ToolbarButton.js b/react/features/toolbox/components/web/ToolbarButton.jsindex 6000c5f803..ccd0469042 100644--- a/react/features/toolbox/components/web/ToolbarButton.js+++ b/react/features/toolbox/components/web/ToolbarButton.js@@ -22,7 +22,12 @@ type Props = AbstractToolbarButtonProps & {* From which direction the tooltip should appear, relative to the* button.*/- tooltipPosition: string+ tooltipPosition: string,++ /**+ * keyDown handler+ */+ onKeyDown?: Function};/**@@ -48,32 +53,40 @@ class ToolbarButton extends AbstractToolbarButton<Props> {constructor(props: Props) {super(props);- this._onKeyDown = this._onKeyDown.bind(this);+ this._onKeyPress = this._onKeyPress.bind(this);+ this._onClick = this._onClick.bind(this);}- _onKeyDown: (Object) => void;+ _onKeyPress: (Object) => void;/**- * Handles 'Enter' key on the button to trigger onClick for accessibility.- * We should be handling Space onKeyUp but it conflicts with PTT.+ * Handles 'Enter' and Space key on the button to trigger onClick for accessibility.** @param {Object} event - The key event.* @private* @returns {void}*/- _onKeyDown(event) {- // If the event coming to the dialog has been subject to preventDefault- // we don't handle it here.- if (event.defaultPrevented) {- return;- }-- if (event.key === 'Enter') {+ _onKeyPress(event) {+ if (event.key === 'Enter' || event.key === ' ') {event.preventDefault();- event.stopPropagation();this.props.onClick();}}+ _onClick: (Object) => void;++ /**+ * Handles button click.+ *+ * @param {Object} e - The key event.+ * @private+ * @returns {void}+ */+ _onClick(e) {+ this.props.onClick(e);++ // blur after click to release focus from button to allow PTT.+ e && e.currentTarget && e.currentTarget.blur();+ }/*** Renders the button of this {@code ToolbarButton}.@@ -89,8 +102,9 @@ class ToolbarButton extends AbstractToolbarButton<Props> {aria-label = { this.props.accessibilityLabel }aria-pressed = { this.props.toggled }className = 'toolbox-button'- onClick = { this.props.onClick }- onKeyDown = { this._onKeyDown }+ onClick = { this._onClick }+ onKeyDown = { this.props.onKeyDown }+ onKeyPress = { this._onKeyPress }role = 'button'tabIndex = { 0 }>{ this.props.tooltipdiff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.jsindex 9181266d7e..ced8e89179 100644--- a/react/features/toolbox/components/web/Toolbox.js+++ b/react/features/toolbox/components/web/Toolbox.js@@ -2,6 +2,7 @@import React, { Component } from 'react';+import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut';import {ACTION_SHORTCUT_TRIGGERED,createShortcutEvent,@@ -289,6 +290,7 @@ class Toolbox extends Component<Props> {this._onToolbarToggleShareAudio = this._onToolbarToggleShareAudio.bind(this);this._onToolbarOpenLocalRecordingInfoDialog = this._onToolbarOpenLocalRecordingInfoDialog.bind(this);this._onShortcutToggleTileView = this._onShortcutToggleTileView.bind(this);+ this._onEscKey = this._onEscKey.bind(this);}/**@@ -397,6 +399,21 @@ class Toolbox extends Component<Props> {);}+ _onEscKey: (KeyboardEvent) => void;++ /**+ * Key handler for overflow menu.+ *+ * @param {KeyboardEvent} e - Esc key click to close the popup.+ * @returns {void}+ */+ _onEscKey(e) {+ if (e.key === 'Escape') {+ e.stopPropagation();+ this._closeOverflowMenuIfOpen();+ }+ }+/*** Closes the overflow menu if opened.*@@ -1065,7 +1082,7 @@ class Toolbox extends Component<Props> {showLabel = { true } />,this.props._shouldShowButton('mute-video-everyone')&& <MuteEveryonesVideoButton- key = 'mute-everyones-video'+ key = 'mute-video-everyone'showLabel = { true } />,this.props._shouldShowButton('livestreaming')&& <LiveStreamButton@@ -1134,6 +1151,7 @@ class Toolbox extends Component<Props> {showLabel = { true } />,this.props._shouldShowButton('shortcuts')&& !_isMobile+ && keyboardShortcut.getEnabled()&& <OverflowMenuItemaccessibilityLabel = { t('toolbar.accessibilityLabel.shortcuts') }icon = { IconDeviceDocument }@@ -1178,7 +1196,6 @@ class Toolbox extends Component<Props> {_chatOpen,_desktopSharingEnabled,_desktopSharingDisabledTooltipKey,- _raisedHand,_screensharing,t} = this.props;@@ -1228,20 +1245,22 @@ class Toolbox extends Component<Props> {}if (this.props._shouldShowButton('raisehand')) {+ const raisedHand = this.props._raisedHand || false;+buttons.has('raisehand')? mainMenuAdditionalButtons.push(<ToolbarButtonaccessibilityLabel = { t('toolbar.accessibilityLabel.raiseHand') }icon = { IconRaisedHand }key = 'raisehand'onClick = { this._onToolbarToggleRaiseHand }- toggled = { _raisedHand }- tooltip = { t(`toolbar.${_raisedHand ? 'lowerYourHand' : 'raiseYourHand'}`) } />)+ toggled = { raisedHand }+ tooltip = { t(`toolbar.${raisedHand ? 'lowerYourHand' : 'raiseYourHand'}`) } />): overflowMenuAdditionalButtons.push(<OverflowMenuItemaccessibilityLabel = { t('toolbar.accessibilityLabel.raiseHand') }icon = { IconRaisedHand }key = 'raisehand'onClick = { this._onToolbarToggleRaiseHand }- text = { t(`toolbar.${_raisedHand ? 'lowerYourHand' : 'raiseYourHand'}`) } />);+ text = { t(`toolbar.${raisedHand ? 'lowerYourHand' : 'raiseYourHand'}`) } />);}if (this.props._shouldShowButton('participants-pane') || this.props._shouldShowButton('invite')) {@@ -1344,11 +1363,15 @@ class Toolbox extends Component<Props> {{ this._renderVideoButton() }{ mainMenuAdditionalButtons }{ showOverflowMenuButton && <OverflowMenuButton+ ariaControls = 'overflow-menu'isOpen = { _overflowMenuVisible }onVisibilityChange = { this._onSetOverflowVisible }><ularia-label = { t(toolbarAccLabel) }- className = 'overflow-menu'>+ className = 'overflow-menu'+ id = 'overflow-menu'+ onKeyDown = { this._onEscKey }+ role = 'menu'>{ this._renderOverflowMenuContent(overflowMenuAdditionalButtons) }</ul></OverflowMenuButton>}diff --git a/react/features/toolbox/components/web/VideoSettingsButton.js b/react/features/toolbox/components/web/VideoSettingsButton.jsindex 8619f096b0..13590a03c7 100644--- a/react/features/toolbox/components/web/VideoSettingsButton.js+++ b/react/features/toolbox/components/web/VideoSettingsButton.js@@ -9,9 +9,11 @@ import { connect } from '../../../base/redux';import { ToolboxButtonWithIcon } from '../../../base/toolbox/components';import { getLocalJitsiVideoTrack } from '../../../base/tracks';import { toggleVideoSettings, VideoSettingsPopup } from '../../../settings';+import { getVideoSettingsVisibility } from '../../../settings/functions';import { isVideoSettingsButtonDisabled } from '../../functions';import VideoMuteButton from '../VideoMuteButton';+type Props = {/**@@ -45,7 +47,12 @@ type Props = {/*** Used for translation*/- t: Function+ t: Function,++ /**+ * Defines is popup is open+ */+ isOpen: boolean};/**@@ -54,6 +61,16 @@ type Props = {* @returns {ReactElement}*/class VideoSettingsButton extends Component<Props> {+ /**+ * Initializes a new {@code AudioSettingsButton} instance.+ *+ * @inheritdoc+ */+ constructor(props: Props) {+ super(props);++ this._onEscClick = this._onEscClick.bind(this);+ }/*** Returns true if the settings icon is disabled.@@ -65,6 +82,21 @@ class VideoSettingsButton extends Component<Props> {return (!hasPermissions || isDisabled) && !hasVideoTrack;}+ _onEscClick: (KeyboardEvent) => void;++ /**+ * Click handler for the more actions entries.+ *+ * @param {KeyboardEvent} event - Esc key click to close the popup.+ * @returns {void}+ */+ _onEscClick(event) {+ if (event.key === 'Escape' && this.props.isOpen) {+ event.preventDefault();+ event.stopPropagation();+ this.props.onVideoOptionsClick();+ }+ }/*** Implements React's {@link Component#render}.@@ -72,15 +104,21 @@ class VideoSettingsButton extends Component<Props> {* @inheritdoc*/render() {- const { onVideoOptionsClick, t, visible } = this.props;+ const { onVideoOptionsClick, t, visible, isOpen } = this.props;return visible ? (<VideoSettingsPopup><ToolboxButtonWithIcon+ ariaControls = 'video-settings-dialog'+ ariaExpanded = { isOpen }+ ariaHasPopup = { true }+ ariaLabel = { this.props.t('toolbar.videoSettings') }icon = { IconArrowUp }iconDisabled = { this._isIconDisabled() }+ iconId = 'video-settings-button'iconTooltip = { t('toolbar.videoSettings') }- onIconClick = { onVideoOptionsClick }>+ onIconClick = { onVideoOptionsClick }+ onIconKeyDown = { this._onEscClick }><VideoMuteButton /></ToolboxButtonWithIcon></VideoSettingsPopup>@@ -101,6 +139,7 @@ function mapStateToProps(state) {hasPermissions: permissions.video,hasVideoTrack: Boolean(getLocalJitsiVideoTrack(state)),isDisabled: isVideoSettingsButtonDisabled(state),+ isOpen: getVideoSettingsVisibility(state),visible: !isMobileBrowser()};}diff --git a/react/features/video-menu/components/web/LocalVideoMenuTriggerButton.js b/react/features/video-menu/components/web/LocalVideoMenuTriggerButton.jsindex b81fa21ad7..223e84941e 100644--- a/react/features/video-menu/components/web/LocalVideoMenuTriggerButton.js+++ b/react/features/video-menu/components/web/LocalVideoMenuTriggerButton.js@@ -2,6 +2,7 @@import React from 'react';+import { translate } from '../../../base/i18n';import { Icon, IconMenuThumb } from '../../../base/icons';import { Popover } from '../../../base/popover';import { connect } from '../../../base/redux';@@ -32,7 +33,12 @@ type Props = {/*** Shows/hides the local video flip button.*/- _showLocalVideoFlipButton: boolean+ _showLocalVideoFlipButton: boolean,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -56,9 +62,12 @@ function LocalVideoMenuTriggerButton(props: Props) {<spanclassName = 'popover-trigger local-video-menu-trigger'><Icon+ ariaLabel = { props.t('dialog.localUserControls') }+ role = 'button'size = '1em'src = { IconMenuThumb }- title = 'Local user controls' />+ tabIndex = { 0 }+ title = { props.t('dialog.localUserControls') } /></span></Popover>: null@@ -97,4 +106,4 @@ function _mapStateToProps(state) {};}-export default connect(_mapStateToProps)(LocalVideoMenuTriggerButton);+export default translate(connect(_mapStateToProps)(LocalVideoMenuTriggerButton));diff --git a/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js b/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.jsindex 97d1c6323e..df04de3311 100644--- a/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js+++ b/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js@@ -2,6 +2,7 @@import React, { Component } from 'react';+import { translate } from '../../../base/i18n';import { Icon, IconMenuThumb } from '../../../base/icons';import { getLocalParticipant, getParticipantById, PARTICIPANT_ROLE } from '../../../base/participants';import { Popover } from '../../../base/popover';@@ -92,6 +93,16 @@ type Props = {* The ID for the participant on which the remote video menu will act.*/participantID: string,++ /**+ * The ID for the participant on which the remote video menu will act.+ */+ _participantDisplayName: string,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -114,17 +125,21 @@ class RemoteVideoMenuTriggerButton extends Component<Props> {return null;}+ const username = this.props._participantDisplayName;+return (<Popovercontent = { content }overflowDrawer = { this.props._overflowDrawer }position = { this.props._menuPosition }>- <span- className = 'popover-trigger remote-video-menu-trigger'>+ <span className = 'popover-trigger remote-video-menu-trigger'><Icon- size = '1em'+ ariaLabel = { this.props.t('dialog.remoteUserControls', { username }) }+ role = 'button'+ size = '1.4em'src = { IconMenuThumb }- title = 'Remote user controls' />+ tabIndex = { 0 }+ title = { this.props.t('dialog.remoteUserControls', { username }) } /></span></Popover>);@@ -217,6 +232,7 @@ class RemoteVideoMenuTriggerButton extends Component<Props> {participantID = { participantID } />);+if (onVolumeChange && typeof initialVolumeValue === 'number' && !isNaN(initialVolumeValue)) {buttons.push(<VolumeSlider@@ -253,6 +269,7 @@ function _mapStateToProps(state, ownProps) {const { disableKick, disableGrantModerator } = remoteVideoMenu;let _remoteControlState = null;const participant = getParticipantById(state, participantID);+ const _participantDisplayName = participant.name;const _isRemoteControlSessionActive = participant?.remoteControlSessionStatus ?? false;const _supportsRemoteControl = participant?.supportsRemoteControl ?? false;const { active, controller } = state['features/remote-control'];@@ -292,8 +309,9 @@ function _mapStateToProps(state, ownProps) {_remoteControlState,_menuPosition,_overflowDrawer: overflowDrawer,+ _participantDisplayName,_disableGrantModerator: Boolean(disableGrantModerator)};}-export default connect(_mapStateToProps)(RemoteVideoMenuTriggerButton);+export default translate(connect(_mapStateToProps)(RemoteVideoMenuTriggerButton));diff --git a/react/features/video-menu/components/web/VideoMenuButton.js b/react/features/video-menu/components/web/VideoMenuButton.jsindex 09cd32c5e9..f184386258 100644--- a/react/features/video-menu/components/web/VideoMenuButton.js+++ b/react/features/video-menu/components/web/VideoMenuButton.js@@ -43,6 +43,35 @@ type Props = {* @extends {Component}*/export default class VideoMenuButton extends Component<Props> {+ /**+ * Initializes a new {@code RemoteVideoMenuButton} instance.+ *+ * @param {*} props - The read-only properties with which the new instance+ * is to be initialized.+ */+ constructor(props: Props) {+ super(props);++ // Bind event handler so it is only bound once for every instance.+ this._onKeyPress = this._onKeyPress.bind(this);+ }++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (this.props.onClick && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ this.props.onClick();+ }+ }+/*** Implements React's {@link Component#render()}.*@@ -63,9 +92,13 @@ export default class VideoMenuButton extends Component<Props> {return (<li className = 'popupmenu__item'><a+ aria-label = { buttonText ? buttonText : 'some thing' }className = { linkClassName }id = { id }- onClick = { onClick }>+ onClick = { onClick }+ onKeyPress = { this._onKeyPress }+ role = 'button'+ tabIndex = { 0 }><span className = 'popupmenu__icon'>{ icon && <Icon src = { icon } /> }</span>diff --git a/react/features/video-menu/components/web/VolumeSlider.js b/react/features/video-menu/components/web/VolumeSlider.jsindex 965b9d6a66..d70fa50d15 100644--- a/react/features/video-menu/components/web/VolumeSlider.js+++ b/react/features/video-menu/components/web/VolumeSlider.js@@ -2,6 +2,7 @@import React, { Component } from 'react';+import { translate } from '../../../base/i18n';import { Icon, IconVolume } from '../../../base/icons';/**@@ -26,7 +27,12 @@ type Props = {/*** The callback to invoke when the audio slider value changes.*/- onChange: Function+ onChange: Function,++ /**+ * Invoked to obtain translated strings.+ */+ t: Function};/**@@ -73,17 +79,23 @@ class VolumeSlider extends Component<Props, State> {*/render() {return (- <li className = 'popupmenu__item'>+ <li+ aria-label = { this.props.t('volumeSlider') }+ className = 'popupmenu__item'><div className = 'popupmenu__contents'><span className = 'popupmenu__icon'><Icon src = { IconVolume } /></span><div className = 'popupmenu__slider_container'><input+ aria-valuemax = { VOLUME_SLIDER_SCALE }+ aria-valuemin = { 0 }+ aria-valuenow = { this.state.volumeLevel }className = 'popupmenu__slider'max = { VOLUME_SLIDER_SCALE }min = { 0 }onChange = { this._onVolumeChange }+ tabIndex = { 0 }type = 'range'value = { this.state.volumeLevel } /></div>@@ -110,4 +122,4 @@ class VolumeSlider extends Component<Props, State> {}}-export default VolumeSlider;+export default translate(VolumeSlider);diff --git a/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js b/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.jsindex 5fcc40ddb7..60260b71c7 100644--- a/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js+++ b/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js@@ -63,6 +63,36 @@ type Props = {* @extends Component*/class OverflowMenuVideoQualityItem extends Component<Props> {++ /**+ * Initializes a new {@code OverflowMenuVideoQualityItem} instance.+ *+ * @param {*} props - The read-only properties with which the new instance+ * is to be initialized.+ */+ constructor(props) {+ super(props);++ // Bind event handler so it is only bound once for every instance.+ this._onKeyPress = this._onKeyPress.bind(this);+ }++ _onKeyPress: (Object) => void;++ /**+ * KeyPress handler for accessibility.+ *+ * @param {Object} e - The key event to handle.+ *+ * @returns {void}+ */+ _onKeyPress(e) {+ if (this.props.onClick && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ this.props.onClick();+ }+ }+/*** Implements React's {@link Component#render()}.*@@ -78,10 +108,12 @@ class OverflowMenuVideoQualityItem extends Component<Props> {return (<li- aria-label =- { this.props.t('toolbar.accessibilityLabel.callQuality') }+ aria-label = { this.props.t('toolbar.accessibilityLabel.callQuality') }className = 'overflow-menu-item'- onClick = { this.props.onClick }>+ onClick = { this.props.onClick }+ onKeyPress = { this._onKeyPress }+ role = 'menuitem'+ tabIndex = { 0 }><span className = 'overflow-menu-item-icon'><Icon src = { icon } /></span>diff --git a/react/features/video-quality/components/VideoQualitySlider.web.js b/react/features/video-quality/components/VideoQualitySlider.web.jsindex f93fbd4758..418914578f 100644--- a/react/features/video-quality/components/VideoQualitySlider.web.js+++ b/react/features/video-quality/components/VideoQualitySlider.web.js@@ -154,6 +154,7 @@ class VideoQualitySlider extends Component<Props> {* removed after upgrading to React 16.*/ }<input+ aria-label = { t('videoStatus.callQuality') }className = 'video-quality-dialog-slider'max = { this._sliderOptions.length - 1 }min = '0'diff --git a/react/features/virtual-background/components/VirtualBackgroundDialog.js b/react/features/virtual-background/components/VirtualBackgroundDialog.jsindex e3b9a4a806..a977847bf7 100644--- a/react/features/virtual-background/components/VirtualBackgroundDialog.js+++ b/react/features/virtual-background/components/VirtualBackgroundDialog.js@@ -1,9 +1,9 @@// @flow-/* eslint-disable react/jsx-no-bind, no-return-assign */+import Spinner from '@atlaskit/spinner';import Bourne from '@hapi/bourne';import { jitsiLocalStorage } from '@jitsi/js-utils/jitsi-local-storage';-import React, { useState, useEffect } from 'react';+import React, { useState, useEffect, useCallback, useRef } from 'react';import uuid from 'uuid';import { Dialog, hideDialog } from '../../base/dialog';@@ -12,6 +12,7 @@ import { Icon, IconCloseSmall, IconPlusCircle, IconShareDesktop } from '../../baimport { createLocalTrack } from '../../base/lib-jitsi-meet/functions';import { VIDEO_TYPE } from '../../base/media';import { connect } from '../../base/redux';+import { Tooltip } from '../../base/tooltip';import { getLocalVideoTrack } from '../../base/tracks';import { showErrorNotification } from '../../notifications';import { toggleBackgroundEffect } from '../actions';@@ -21,36 +22,50 @@ import logger from '../logger';import VirtualBackgroundPreview from './VirtualBackgroundPreview';++type Image = {+ tooltip?: string,+ id: string,+ src: string+}+// The limit of virtual background uploads is 24. When the number// of uploads is 25 we trigger the deleteStoredImage function to delete// the first/oldest uploaded background.const backgroundsLimit = 25;-const images = [+const images: Array<Image> = [{+ tooltip: 'image1',id: '1',src: 'images/virtual-background/background-1.jpg'},{+ tooltip: 'image2',id: '2',src: 'images/virtual-background/background-2.jpg'},{+ tooltip: 'image3',id: '3',src: 'images/virtual-background/background-3.jpg'},{+ tooltip: 'image4',id: '4',src: 'images/virtual-background/background-4.jpg'},{+ tooltip: 'image5',id: '5',src: 'images/virtual-background/background-5.jpg'},{+ tooltip: 'image6',id: '6',src: 'images/virtual-background/background-6.jpg'},{+ tooltip: 'image7',id: '7',src: 'images/virtual-background/background-7.jpg'}@@ -83,6 +98,10 @@ type Props = {t: Function};+const onError = event => {+ event.target.style.display = 'none';+};+/*** Renders virtual background dialog.*@@ -91,13 +110,23 @@ type Props = {function VirtualBackground({ _jitsiTrack, _selectedThumbnail, _virtualSource, dispatch, t }: Props) {const [ options, setOptions ] = useState({});const localImages = jitsiLocalStorage.getItem('virtualBackgrounds');- const [ storedImages, setStoredImages ] = useState((localImages && Bourne.parse(localImages)) || []);- const [ loading, isloading ] = useState(false);+ const [ storedImages, setStoredImages ] = useState<Array<Image>>((localImages && Bourne.parse(localImages)) || []);+ const [ loading, setLoading ] = useState(false);+ const uploadImageButton: Object = useRef(null);const [ activeDesktopVideo ] = useState(_virtualSource?.videoType === VIDEO_TYPE.DESKTOP ? _virtualSource : null);- const deleteStoredImage = image => {- setStoredImages(storedImages.filter(item => item !== image));- };+ const deleteStoredImage = useCallback(e => {+ const imageId = e.currentTarget.getAttribute('data-imageid');++ setStoredImages(storedImages.filter(item => item.id !== imageId));+ }, [ storedImages ]);++ const deleteStoredImageKeyPress = useCallback(e => {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ deleteStoredImage(e);+ }+ }, [ deleteStoredImage ]);/*** Updates stored images on local storage.@@ -107,30 +136,48 @@ function VirtualBackground({ _jitsiTrack, _selectedThumbnail, _virtualSource, dijitsiLocalStorage.setItem('virtualBackgrounds', JSON.stringify(storedImages));} catch (err) {// Preventing localStorage QUOTA_EXCEEDED_ERR- err && deleteStoredImage(storedImages[0]);+ err && setStoredImages(storedImages.slice(1));}if (storedImages.length === backgroundsLimit) {- deleteStoredImage(storedImages[0]);+ setStoredImages(storedImages.slice(1));}}, [ storedImages ]);- const enableBlur = async (blurValue, selection) => {++ const enableBlur = useCallback(async () => {setOptions({backgroundType: VIRTUAL_BACKGROUND_TYPE.BLUR,enabled: true,- blurValue,- selectedThumbnail: selection+ blurValue: 25,+ selectedThumbnail: 'blur'});- };+ }, []);- const removeBackground = async () => {+ const enableBlurKeyPress = useCallback(e => {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ enableBlur();+ }+ }, [ enableBlur ]);++ const enableSlideBlur = useCallback(async () => {setOptions({- enabled: false,- selectedThumbnail: 'none'+ backgroundType: VIRTUAL_BACKGROUND_TYPE.BLUR,+ enabled: true,+ blurValue: 8,+ selectedThumbnail: 'slight-blur'});- };+ }, []);++ const enableSlideBlurKeyPress = useCallback(e => {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ enableSlideBlur();+ }+ }, [ enableSlideBlur ]);- const shareDesktop = async selection => {++ const shareDesktop = useCallback(async () => {const url = await createLocalTrack('desktop', '');if (!url) {@@ -144,33 +191,66 @@ function VirtualBackground({ _jitsiTrack, _selectedThumbnail, _virtualSource, disetOptions({backgroundType: VIRTUAL_BACKGROUND_TYPE.DESKTOP_SHARE,enabled: true,- selectedThumbnail: selection,+ selectedThumbnail: 'desktop-share',url});- };+ }, []);++ const shareDesktopKeyPress = useCallback(e => {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ shareDesktop();+ }+ }, [ shareDesktop ]);- const setUploadedImageBackground = async image => {+ const removeBackground = useCallback(async () => {setOptions({- backgroundType: VIRTUAL_BACKGROUND_TYPE.IMAGE,- enabled: true,- url: image.src,- selectedThumbnail: image.id+ enabled: false,+ selectedThumbnail: 'none'});- };+ }, []);- const setImageBackground = async image => {- const url = await toDataURL(image.src);+ const removeBackgroundKeyPress = useCallback(e => {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ removeBackground();+ }+ }, [ removeBackground ]);- setOptions({- backgroundType: VIRTUAL_BACKGROUND_TYPE.IMAGE,- enabled: true,- url,- selectedThumbnail: image.id- });- };+ const setUploadedImageBackground = useCallback(async e => {+ const imageId = e.currentTarget.getAttribute('data-imageid');+ const image = storedImages.find(img => img.id === imageId);++ if (image) {+ setOptions({+ backgroundType: 'image',+ enabled: true,+ url: image.src,+ selectedThumbnail: image.id+ });+ }+ }, [ storedImages ]);++ const setImageBackground = useCallback(async e => {+ const imageId = e.currentTarget.getAttribute('data-imageid');+ const image = images.find(img => img.id === imageId);++ if (image) {+ const url = await toDataURL(image.src);- const uploadImage = async imageFile => {+ setOptions({+ backgroundType: 'image',+ enabled: true,+ url,+ selectedThumbnail: image.id+ });+ setLoading(false);+ }+ }, []);++ const uploadImage = useCallback(async e => {const reader = new FileReader();+ const imageFile = e.target.files;reader.readAsDataURL(imageFile[0]);reader.onload = async () => {@@ -192,20 +272,41 @@ function VirtualBackground({ _jitsiTrack, _selectedThumbnail, _virtualSource, di});};reader.onerror = () => {- isloading(false);+ setLoading(false);logger.error('Failed to upload virtual image!');};- };+ }, [ dispatch, storedImages ]);++ const uploadImageKeyPress = useCallback(e => {+ if (uploadImageButton.current && (e.key === ' ' || e.key === 'Enter')) {+ e.preventDefault();+ uploadImageButton.current.click();+ }+ }, [ uploadImageButton.current ]);++ const setImageBackgroundKeyPress = useCallback(e => {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ setImageBackground(e);+ }+ }, [ setImageBackground ]);++ const setUploadedImageBackgroundKeyPress = useCallback(e => {+ if (e.key === ' ' || e.key === 'Enter') {+ e.preventDefault();+ setUploadedImageBackground(e);+ }+ }, [ setUploadedImageBackground ]);- const applyVirtualBackground = async () => {+ const applyVirtualBackground = useCallback(async () => {if (activeDesktopVideo) {await activeDesktopVideo.dispose();}- isloading(true);+ setLoading(true);await dispatch(toggleBackgroundEffect(options, _jitsiTrack));- await isloading(false);+ await setLoading(false);dispatch(hideDialog());- };+ }, [ dispatch, options ]);return (<Dialog@@ -224,8 +325,11 @@ function VirtualBackground({ _jitsiTrack, _selectedThumbnail, _virtualSource, di) : (<div><label+ aria-label = { t('virtualBackground.uploadImage') }className = 'file-upload-label'- htmlFor = 'file-upload'>+ htmlFor = 'file-upload'+ onKeyPress = { uploadImageKeyPress }+ tabIndex = { 0 } ><IconclassName = { 'add-background' }size = { 20 }@@ -236,61 +340,125 @@ function VirtualBackground({ _jitsiTrack, _selectedThumbnail, _virtualSource, diaccept = 'image/*'className = 'file-upload-btn'id = 'file-upload'- onChange = { e => uploadImage(e.target.files) }+ onChange = { uploadImage }+ ref = { uploadImageButton }type = 'file' />- <div className = 'virtual-background-dialog'>- <div- className = { _selectedThumbnail === 'none' ? 'none-selected' : 'virtual-background-none' }- onClick = { removeBackground }>- {t('virtualBackground.none')}- </div>- <div- className = { _selectedThumbnail === 'slight-blur'- ? 'slight-blur-selected' : 'slight-blur' }- onClick = { () => enableBlur(8, 'slight-blur') }>- {t('virtualBackground.slightBlur')}- </div>- <div- className = { _selectedThumbnail === 'blur' ? 'blur-selected' : 'blur' }- onClick = { () => enableBlur(25, 'blur') }>- {t('virtualBackground.blur')}- </div>- <div- className = { _selectedThumbnail === 'desktop-share'- ? 'desktop-share-selected'- : 'desktop-share' }- onClick = { () => shareDesktop('desktop-share') }>- <Icon- className = 'share-desktop-icon'- size = { 30 }- src = { IconShareDesktop } />- </div>- {images.map((image, index) => (- <img- className = {- options.selectedThumbnail === image.id || _selectedThumbnail === image.id- ? 'thumbnail-selected'- : 'thumbnail'- }- key = { index }- onClick = { () => setImageBackground(image) }- onError = { event => event.target.style.display = 'none' }- src = { image.src } />+ <div+ className = 'virtual-background-dialog'+ role = 'radiogroup'+ tabIndex = '-1'>+ <Tooltip+ content = { t('virtualBackground.removeBackground') }+ position = { 'top' }>+ <div+ aria-checked = { _selectedThumbnail === 'none' }+ aria-label = { t('virtualBackground.removeBackground') }+ className = { _selectedThumbnail === 'none' ? 'background-option none-selected'+ : 'background-option virtual-background-none' }+ onClick = { removeBackground }+ onKeyPress = { removeBackgroundKeyPress }+ role = 'radio'+ tabIndex = { 0 } >+ {t('virtualBackground.none')}+ </div>+ </Tooltip>+ <Tooltip+ content = { t('virtualBackground.slightBlur') }+ position = { 'top' }>+ <div+ aria-checked = { _selectedThumbnail === 'slight-blur' }+ aria-label = { t('virtualBackground.slightBlur') }+ className = { _selectedThumbnail === 'slight-blur'+ ? 'background-option slight-blur-selected' : 'background-option slight-blur' }+ onClick = { enableSlideBlur }+ onKeyPress = { enableSlideBlurKeyPress }+ role = 'radio'+ tabIndex = { 0 }>+ {t('virtualBackground.slightBlur')}+ </div>+ </Tooltip>+ <Tooltip+ content = { t('virtualBackground.blur') }+ position = { 'top' }>+ <div+ aria-checked = { _selectedThumbnail === 'blur' }+ aria-label = { t('virtualBackground.blur') }+ className = { _selectedThumbnail === 'blur' ? 'background-option blur-selected'+ : 'background-option blur' }+ onClick = { enableBlur }+ onKeyPress = { enableBlurKeyPress }+ role = 'radio'+ tabIndex = { 0 }>+ {t('virtualBackground.blur')}+ </div>+ </Tooltip>+ <Tooltip+ content = { t('virtualBackground.desktopShare') }+ position = { 'top' }>+ <div+ aria-checked = { _selectedThumbnail === 'desktop-share' }+ aria-label = { t('virtualBackground.desktopShare') }+ className = { _selectedThumbnail === 'desktop-share'+ ? 'background-option desktop-share-selected'+ : 'background-option desktop-share' }+ onClick = { shareDesktop }+ onKeyPress = { shareDesktopKeyPress }+ role = 'radio'+ tabIndex = { 0 }>+ <Icon+ className = 'share-desktop-icon'+ size = { 30 }+ src = { IconShareDesktop } />+ </div>+ </Tooltip>+ {images.map(image => (+ <Tooltip+ content = { image.tooltip && t(`virtualBackground.${image.tooltip}`) }+ key = { image.id }+ position = { 'top' }>+ <img+ alt = { image.tooltip && t(`virtualBackground.${image.tooltip}`) }+ aria-checked = { options.selectedThumbnail === image.id+ || _selectedThumbnail === image.id }+ className = {+ options.selectedThumbnail === image.id || _selectedThumbnail === image.id+ ? 'background-option thumbnail-selected' : 'background-option thumbnail' }+ data-imageid = { image.id }+ onClick = { setImageBackground }+ onError = { onError }+ onKeyPress = { setImageBackgroundKeyPress }+ role = 'radio'+ src = { image.src }+ tabIndex = { 0 } />+ </Tooltip>))}{storedImages.map((image, index) => (<divclassName = { 'thumbnail-container' }- key = { index }>+ key = { image.id }><img- className = { _selectedThumbnail === image.id ? 'thumbnail-selected' : 'thumbnail' }- onClick = { () => setUploadedImageBackground(image) }- onError = { event => event.target.style.display = 'none' }- src = { image.src } />+ alt = { t('virtualBackground.uploadedImage', { index: index + 1 }) }+ aria-checked = { _selectedThumbnail === image.id }+ className = { _selectedThumbnail === image.id+ ? 'background-option thumbnail-selected' : 'background-option thumbnail' }+ data-imageid = { image.id }+ onClick = { setUploadedImageBackground }+ onError = { onError }+ onKeyPress = { setUploadedImageBackgroundKeyPress }+ role = 'radio'+ src = { image.src }+ tabIndex = { 0 } />+<Icon+ ariaLabel = { t('virtualBackground.deleteImage') }className = { 'delete-image-icon' }- onClick = { () => deleteStoredImage(image) }+ data-imageid = { image.id }+ onClick = { deleteStoredImage }+ onKeyPress = { deleteStoredImageKeyPress }+ role = 'button'size = { 15 }- src = { IconCloseSmall } />+ src = { IconCloseSmall }+ tabIndex = { 0 } /></div>))}</div>diff --git a/react/features/welcome/components/WelcomePage.web.js b/react/features/welcome/components/WelcomePage.web.jsindex 21121c231e..ad420f3d06 100644--- a/react/features/welcome/components/WelcomePage.web.js+++ b/react/features/welcome/components/WelcomePage.web.js@@ -356,17 +356,23 @@ class WelcomePage extends AbstractWelcomePage {<aclassName = 'welcome-badge'href = { MOBILE_DOWNLOAD_LINK_IOS }>- <img src = './images/app-store-badge.png' />+ <img+ alt = { t('welcomepage.mobileDownLoadLinkIos') }+ src = './images/app-store-badge.png' /></a><aclassName = 'welcome-badge'href = { MOBILE_DOWNLOAD_LINK_ANDROID }>- <img src = './images/google-play-badge.png' />+ <img+ alt = { t('welcomepage.mobileDownLoadLinkAndroid') }+ src = './images/google-play-badge.png' /></a><aclassName = 'welcome-badge'href = { MOBILE_DOWNLOAD_LINK_F_DROID }>- <img src = './images/f-droid-badge.png' />+ <img+ alt = { t('welcomepage.mobileDownLoadLinkFDroid') }+ src = './images/f-droid-badge.png' /></a></div></div>diff --git a/static/prejoin.html b/static/prejoin.htmlindex e88bfd6f55..65e81f1bcb 100644--- a/static/prejoin.html+++ b/static/prejoin.html@@ -38,6 +38,6 @@<script src="libs/app.bundle.min.js?v=139"></script></head><body>- <div id="react"></div>+ <div id="react" role="main"></div></body></html>diff --git a/webpack.config.js b/webpack.config.jsindex 46a421c778..0dbe760d3e 100644--- a/webpack.config.js+++ b/webpack.config.js@@ -224,7 +224,7 @@ module.exports = [...config.plugins,...getBundleAnalyzerPlugin('alwaysontop')],- performance: getPerformanceHints(400 * 1024)+ performance: getPerformanceHints(800 * 1024)}),Object.assign({}, config, {entry: {