You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-08 23:07:32 +02:00
Desktop: Accessibility: Add label to the delete buttons of the Note Attachments (#11749)
This commit is contained in:
@@ -116,7 +116,7 @@ const ResourceTableComp = (props: ResourceTable) => {
|
|||||||
<tbody>
|
<tbody>
|
||||||
{filteredResources.map((resource: InnerResource, index: number) =>
|
{filteredResources.map((resource: InnerResource, index: number) =>
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td style={titleCellStyle} className="titleCell">
|
<td id={`title-${resource.id}`} style={titleCellStyle} className="titleCell">
|
||||||
<a
|
<a
|
||||||
style={{ color: theme.urlColor }}
|
style={{ color: theme.urlColor }}
|
||||||
href="#"
|
href="#"
|
||||||
@@ -126,7 +126,14 @@ const ResourceTableComp = (props: ResourceTable) => {
|
|||||||
<td style={cellStyle} className="dataCell">{prettyBytes(resource.size)}</td>
|
<td style={cellStyle} className="dataCell">{prettyBytes(resource.size)}</td>
|
||||||
<td style={cellStyle} className="dataCell">{resource.id}</td>
|
<td style={cellStyle} className="dataCell">{resource.id}</td>
|
||||||
<td style={cellStyle} className="dataCell">
|
<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>
|
</td>
|
||||||
</tr>,
|
</tr>,
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user