Skip to content

fix(accessibility): update download button visibility and styles #1453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import connectFileDownloader from '@webex/react-container-file-downloader';

function ShareListingItem({fileShare, onDownloadClick, type}) {
return (
<div>
<div className="share-listing-item">
<FileShareDisplay
actor={fileShare.actor}
file={fileShare.item}
Expand All @@ -15,6 +15,9 @@ function ShareListingItem({fileShare, onDownloadClick, type}) {
onDownloadClick={onDownloadClick}
type={type}
timestamp={fileShare.timestamp}
showDownloadButtonPermanently
ariaLabel={`Download ${fileShare.item.displayName || 'file'}`}
tabIndex={0}
/>
</div>
);
Expand Down
68 changes: 68 additions & 0 deletions packages/node_modules/@webex/widget-files/src/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* Base widget styles */
.widgetFiles {
display: flex;
height: 100%;
Expand All @@ -10,3 +11,70 @@
overflow-y: auto;
padding: 10px;
}

/* Content tab and hover container */
.content-tab {
position: relative;
}

.md-content__hover {
opacity: 1 !important;
visibility: visible !important;
position: absolute !important;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex !important;
align-items: center !important;
justify-content: center !important;
}

/* Download button styling with improved accessibility */
[data-md-event-key*="md-button"].md-button-circle {
position: absolute !important;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
width: 40px !important; /* Increased for better touch target */
height: 40px !important; /* Increased for better touch target */
border-radius: 50% !important;
background-color: rgba(0, 0, 0, 0.85) !important; /* Darker for better contrast */
display: flex !important;
align-items: center !important;
justify-content: center !important;
opacity: 1 !important;
visibility: visible !important;
z-index: 2;
cursor: pointer !important;
border: none !important;
transition: all 0.2s ease !important;
}

/* Button hover state */
[data-md-event-key*="md-button"].md-button-circle:hover {
background-color: rgba(0, 0, 0, 0.85) !important;
}

/* High contrast button icon */
[data-md-event-key*="md-button"] .md-button__children {
display: flex !important;
align-items: center !important;
justify-content: center !important;
opacity: 1 !important;
color: #FFFFFF !important; /* Explicit white for contrast */
font-size: 16px !important; /* Increased icon size */
}

/* Enhanced focus state for keyboard navigation */
[data-md-event-key*="md-button"].md-button-circle:focus {
outline: 3px solid #0073C6 !important; /* Thicker outline */
outline-offset: 3px !important;
box-shadow: 0 0 0 4px rgba(0, 115, 198, 0.4) !important;
z-index: 3;
}

/* Active state styling */
[data-md-event-key*="md-button"].md-button-circle:active {
transform: translate(-50%, -50%) scale(0.95) !important;
}