From d07cf8ff2b79706852def03105c6aa3c67e7835f Mon Sep 17 00:00:00 2001 From: panku51 Date: Sun, 27 Apr 2025 19:49:47 +0530 Subject: [PATCH 1/2] fix(meeting): improve accessibility by removing incorrect instructions and providing clear guidance --- .../MeetingsJSONAdapter/controls/SwitchMicrophoneControl.js | 1 - .../MeetingsJSONAdapter/controls/SwitchSpeakerControl.js | 1 - src/components/inputs/Dropdown/Dropdown.jsx | 6 +++++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/adapters/MeetingsJSONAdapter/controls/SwitchMicrophoneControl.js b/src/adapters/MeetingsJSONAdapter/controls/SwitchMicrophoneControl.js index 85d54ba7b..5eb439286 100644 --- a/src/adapters/MeetingsJSONAdapter/controls/SwitchMicrophoneControl.js +++ b/src/adapters/MeetingsJSONAdapter/controls/SwitchMicrophoneControl.js @@ -49,7 +49,6 @@ export default class SwitchMicrophoneControl extends MeetingControl { noOptionsMessage: 'No available microphones', options: null, selected: null, - hint: 'Use arrow keys to navigate between microphone options and hit "Enter" to select.', }); observer.complete(); } else { diff --git a/src/adapters/MeetingsJSONAdapter/controls/SwitchSpeakerControl.js b/src/adapters/MeetingsJSONAdapter/controls/SwitchSpeakerControl.js index 57d898c20..8dbc54465 100644 --- a/src/adapters/MeetingsJSONAdapter/controls/SwitchSpeakerControl.js +++ b/src/adapters/MeetingsJSONAdapter/controls/SwitchSpeakerControl.js @@ -55,7 +55,6 @@ export default class SwitchSpeakerControl extends MeetingControl { noOptionsMessage: 'No available speakers', options: null, selected: null, - hint: 'Use arrow keys to navigate between speaker options and hit "Enter" to select.', }); observer.complete(); } else { diff --git a/src/components/inputs/Dropdown/Dropdown.jsx b/src/components/inputs/Dropdown/Dropdown.jsx index 17a2939c5..002dbe048 100644 --- a/src/components/inputs/Dropdown/Dropdown.jsx +++ b/src/components/inputs/Dropdown/Dropdown.jsx @@ -56,7 +56,11 @@ export default function Dropdown({ const expand = (withKey) => setExpanded({withKey}); const toggleExpanded = (withKey) => { if (!disabled) { - setExpanded(expanded ? undefined : {withKey}); + if (expanded) { + collapse(); + } else { + expand(withKey); + } } }; From cd0a324512560ba8460a0ec8fe7d0d26c0614da8 Mon Sep 17 00:00:00 2001 From: khushi19099 Date: Mon, 5 May 2025 09:14:33 +0530 Subject: [PATCH 2/2] fix/SPARK-564418_Fixing_Download_Button_For_Shared_Files_And_Screenshot --- .../WebexActivity/WebexActivity.jsx | 56 +++++++++++++++++-- .../WebexActivity/WebexActivity.scss | 31 ++++++++++ 2 files changed, 81 insertions(+), 6 deletions(-) diff --git a/src/components/WebexActivity/WebexActivity.jsx b/src/components/WebexActivity/WebexActivity.jsx index bb90edd0a..d0210bc31 100644 --- a/src/components/WebexActivity/WebexActivity.jsx +++ b/src/components/WebexActivity/WebexActivity.jsx @@ -17,21 +17,65 @@ import WebexAdaptiveCards from '../WebexAdaptiveCards/WebexAdaptiveCards'; * @param {object} props.style Custom style to apply * @returns {object} JSX of the component */ -export default function WebexActivity({activityID, className, style}) { +export default function WebexActivity({ activityID, className, style }) { const activity = useActivity(activityID); const adapter = useContext(AdapterContext); const hasCards = adapter?.activitiesAdapter?.hasAdaptiveCards(activity); - const [cssClasses, sc] = webexComponentClasses('activity', className); + const [cssClasses, sc] = webexComponentClasses("activity", className); + + function downloadFile(url, name) { + const link = document.createElement("a"); + link.href = url; + link.download = name; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } return (
{activity.displayHeader && ( - + )} -
- {!hasCards && activity.text &&
{activity.text}
} +
+ {!hasCards && activity.text && ( +
{activity.text}
+ )} {hasCards && } + + {/* ✅ Accessible screenshot rendering for shared files */} + {activity?.object?.files?.length > 0 && ( +
+ {activity.object.files.map((file) => ( +
+ {file.displayName +
+ +
+
+ ))} +
+ )}
); @@ -46,4 +90,4 @@ WebexActivity.propTypes = { WebexActivity.defaultProps = { className: '', style: undefined, -}; +}; \ No newline at end of file diff --git a/src/components/WebexActivity/WebexActivity.scss b/src/components/WebexActivity/WebexActivity.scss index bba65a39f..c198a326a 100644 --- a/src/components/WebexActivity/WebexActivity.scss +++ b/src/components/WebexActivity/WebexActivity.scss @@ -25,3 +25,34 @@ $content-left-margin: 3.5rem; //avatar width + margin } } +.share-file-wrapper { + position: relative; + display: inline-block; + margin-top: 8px; + outline: none; +} + +.shared-screenshot { + max-width: 100%; + border-radius: 4px; + display: block; +} + +// Download button initially hidden, appears on hover or keyboard focus +.webex-share-item-actions { + position: absolute; + bottom: 8px; + right: 8px; + opacity: 0; + visibility: hidden; + transition: opacity 0.3s ease; + background: rgba(0, 0, 0, 0.5); + border-radius: 4px; + padding: 4px; +} + +.share-file-wrapper:hover .webex-share-item-actions, +.share-file-wrapper:focus-within .webex-share-item-actions { + opacity: 1; + visibility: visible; +} \ No newline at end of file