Desktop: Accessibility: Add label to the delete buttons of the Note Attachments (#11749)

pull/11804/head
pedr 2025-02-07 16:04:37 -03:00 committed by GitHub
parent 2b5881a103
commit a4ab197c42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 2 deletions

View File

@ -116,7 +116,7 @@ const ResourceTableComp = (props: ResourceTable) => {
<tbody>
{filteredResources.map((resource: InnerResource, index: number) =>
<tr key={index}>
<td style={titleCellStyle} className="titleCell">
<td id={`title-${resource.id}`} style={titleCellStyle} className="titleCell">
<a
style={{ color: theme.urlColor }}
href="#"
@ -126,7 +126,14 @@ const ResourceTableComp = (props: ResourceTable) => {
<td style={cellStyle} className="dataCell">{prettyBytes(resource.size)}</td>
<td style={cellStyle} className="dataCell">{resource.id}</td>
<td style={cellStyle} className="dataCell">
<button style={theme.buttonStyle} onClick={() => props.onResourceDelete(resource)}>{_('Delete')}</button>
<button
id={`delete-${resource.id}`}
aria-labelledby={`delete-${resource.id} title-${resource.id}`}
style={theme.buttonStyle}
onClick={() => props.onResourceDelete(resource)}
>
{_('Delete')}
</button>
</td>
</tr>,
)}