Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(accessibility): add focus and blur handle to the toolbar (#15054)

AHMAD KADRI176e409af58c
diff --git a/react/features/toolbox/components/web/Toolbox.tsx b/react/features/toolbox/components/web/Toolbox.tsx
index ad34a54f64..6683296969 100644
--- a/react/features/toolbox/components/web/Toolbox.tsx
+++ b/react/features/toolbox/components/web/Toolbox.tsx
@@ -13,7 +13,7 @@ import {
setHangupMenuVisible,
setOverflowMenuVisible,
setToolbarHovered,
- showToolbox
+ setToolboxVisible
} from '../../actions.web';
import {
getJwtDisabledButtons,
@@ -198,15 +198,22 @@ export default function Toolbox({
}, [ dispatch ]);
/**
- * Toggle the toolbar visibility when tabbing into it.
+ * Handle focus on the toolbar.
*
* @returns {void}
*/
- const onTabIn = useCallback(() => {
- if (!toolbarVisible) {
- dispatch(showToolbox());
- }
- }, [ toolbarVisible, dispatch ]);
+ const handleFocus = useCallback(() => {
+ dispatch(setToolboxVisible(true));
+ }, [ dispatch ]);
+
+ /**
+ * Handle blur the toolbar..
+ *
+ * @returns {void}
+ */
+ const handleBlur = useCallback(() => {
+ dispatch(setToolboxVisible(false));
+ }, [ dispatch ]);
if (iAmRecorder || iAmSipGateway) {
return null;
@@ -243,7 +250,8 @@ export default function Toolbox({
<div className = { containerClassName }>
<div
className = 'toolbox-content-wrapper'
- onFocus = { onTabIn }
+ onBlur = { handleBlur }
+ onFocus = { handleFocus }
{ ...(isMobile ? {} : {
onMouseOut,
onMouseOver