Skip to content

Commit

Permalink
Merge pull request #992 from Joice-crypto/buttons_name
Browse files Browse the repository at this point in the history
I added aria-label to the buttons
  • Loading branch information
birm authored Jul 5, 2024
2 parents d889a4e + 3b28850 commit 427b72a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,28 +315,28 @@ function initialize() {

const btn = `<div id='open-delete'>
<button class="btn btn-primary btn-sm" data-id='${sanitize(rs[0])}' onclick='openView(this)'>Open</button>
<button type='button' class='btn btn-primary btn-sm DownloadButton' id='downloadBtn' data-id='${sanitize(rs[0])}' onclick='downloadSlide(this)'>
<button aria-label="Download" type='button' class='btn btn-primary btn-sm DownloadButton' id='downloadBtn' data-id='${sanitize(rs[0])}' onclick='downloadSlide(this)'>
<i class='fas fa-download' ></i>
</button>
${slideDeleteRequests[counter] && slideDeleteRequests[counter].slideDetails &&
slideDeleteRequests.find((o) => o.slideDetails.slideId === rs[0]) ?
`
${slideDeleteRequests.find((o) => o.requestedBy === sanitize(getUserId())) ?
`
<button type='button' class='btn btn-danger btn-sm DelButton' id='deleteBtn' data-id='${sanitize(rs[0])}' data-name='${sanitize(rs[1])}' onclick='deleteSld(this)' data-reqid='${slideDeleteRequests.find((o) => o.slideDetails.slideId === rs[0]) ? slideDeleteRequests.find((o) => o.slideDetails.slideId === rs[0])._id.$oid : ''}' data-filename='${sanitize(filename)}' data-toggle='modal'>
<button aria-label="Delete" type='button' class='btn btn-danger btn-sm DelButton' id='deleteBtn' data-id='${sanitize(rs[0])}' data-name='${sanitize(rs[1])}' onclick='deleteSld(this)' data-reqid='${slideDeleteRequests.find((o) => o.slideDetails.slideId === rs[0]) ? slideDeleteRequests.find((o) => o.slideDetails.slideId === rs[0])._id.$oid : ''}' data-filename='${sanitize(filename)}' data-toggle='modal'>
Cancel Delete Request <i class='fas fa-trash-alt' ></i>
</button>
` :
`
<button disabled type='button' class='btn btn-danger btn-sm tooltipCustom' id='deleteBtn'>
<button aria-label="Delete" disabled type='button' class='btn btn-danger btn-sm tooltipCustom' id='deleteBtn'>
<span class="tooltiptextCustom p-1">Delete requested by ${slideDeleteRequests.find((o) => o.slideDetails.slideId === rs[0]) ? slideDeleteRequests.find((o) => o.slideDetails.slideId === rs[0]).requestedBy : ''}</span>
Delete Requested <i class='fas fa-trash-alt' ></i>
</button>
`
}
` :
`
<button type='button' class='btn btn-danger btn-sm DelButton' id='deleteBtn' data-id='${sanitize(rs[0])}' data-name='${sanitize(rs[1])}' onclick='deleteSld(this)' data-filename='${sanitize(filename)}' data-toggle='modal'>
<button aria-label="Delete" type='button' class='btn btn-danger btn-sm DelButton' id='deleteBtn' data-id='${sanitize(rs[0])}' data-name='${sanitize(rs[1])}' onclick='deleteSld(this)' data-filename='${sanitize(filename)}' data-toggle='modal'>
${permissions.slide.delete == true ? '' : 'Request Deletion'} <i class='fas fa-trash-alt' ></i>
</button>
`
Expand Down

0 comments on commit 427b72a

Please sign in to comment.