@@ -173,7 +173,7 @@ export default defineComponent({
173173 const getTriggerContent = (t : any , disabled : boolean ) => {
174174 return (
175175 <div class = " trigger-btn" >
176- <tiny-button disabled = { disabled } onClick = { handleTriggerClick } >
176+ <tiny-button disabled = { disabled } aria-label = { t ( ' ui.fileUpload.uploadFile ' ) } onClick = { handleTriggerClick } >
177177 <TinyIconPlus />
178178 <span >{ t (' ui.fileUpload.uploadFile' )} </span >
179179 </tiny-button >
@@ -225,17 +225,36 @@ export default defineComponent({
225225
226226 const getThumIcon = (file ) => [
227227 showDownload && (
228- <span class = " thumb-icon" title = { t (' ui.fileUpload.downloadFile' )} onClick = { () => execDownload (file )} >
228+ <span
229+ class = " thumb-icon"
230+ role = " button"
231+ tabindex = " 0"
232+ aria-label = { t (' ui.fileUpload.downloadFile' )}
233+ title = { t (' ui.fileUpload.downloadFile' )}
234+ onClick = { () => execDownload (file )} >
229235 <TinyIconDownload class = " download-icon" />
230236 </span >
231237 ),
232238 isEdm && ! isFolder && showUpdate && (
233- <span class = " thumb-icon" title = { t (' ui.fileUpload.updateFile' )} onClick = { () => updateFile (file )} >
239+ <span
240+ class = " thumb-icon"
241+ role = " button"
242+ tabindex = " 0"
243+ aria-label = { t (' ui.fileUpload.updateFile' )}
244+ title = { t (' ui.fileUpload.updateFile' )}
245+ onClick = { () => updateFile (file )} >
234246 <TinyIconFileCloudupload class = " refres-icon" />
235247 </span >
236248 ),
237249 showDel && (
238- <span class = " thumb-icon" title = { t (' ui.fileUpload.deleteFile' )} onClick = { () => handleRemove (file )} >
250+ <span
251+ class = " thumb-icon"
252+ role = " button"
253+ tabindex = " 0"
254+ aria-label = { t (' ui.fileUpload.deleteFile' )}
255+ title = { t (' ui.fileUpload.deleteFile' )}
256+ onClick = { () => handleRemove (file )}
257+ onKeydown = { (event ) => handleEnter (event , () => handleRemove (file ))} >
239258 <TinyIconClose class = " close-icon" />
240259 </span >
241260 )
@@ -508,7 +527,7 @@ export default defineComponent({
508527 const attrs = a ($attrs , [' ^on[A-Z]' ])
509528
510529 return (
511- <div class = " tiny-file-upload" { ... attrs } >
530+ <div class = " tiny-file-upload" role = " group " aria-label = { title } { ... attrs } >
512531 { isSaasType ? getDefaultTitle (title , this .showTitle ) : ' ' }
513532 { notice }
514533 { isPictureCard ? uploadList : ' ' }
0 commit comments