Skip to content

Commit

Permalink
Merge pull request #8589 from alphagov/unique-attachment-admin-links
Browse files Browse the repository at this point in the history
Provide unique aria labels for attachment edit and removal links
  • Loading branch information
ryanb-gds authored Dec 4, 2023
2 parents 434f218 + 4055adf commit b080867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/admin/attachments/_attachments.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<% end %>
</div>
<div class="app-view-edition-resource__actions govuk-grid-column-full govuk-button-group">
<%= link_to("Edit attachment", [:edit, :admin, typecast_for_attachable_routing(attachable), attachment.becomes(Attachment)], class: "govuk-link govuk-link--no-visited-state") %>
<%= link_to("Delete attachment", [:confirm_destroy, :admin, typecast_for_attachable_routing(attachable), attachment.becomes(Attachment)], class: "govuk-link govuk-link--no-visited-state gem-link--destructive") %>
<%= link_to("Edit attachment", [:edit, :admin, typecast_for_attachable_routing(attachable), attachment.becomes(Attachment)], class: "govuk-link govuk-link--no-visited-state", "aria-label": "Edit attachment: #{attachment.title}") %>
<%= link_to("Delete attachment", [:confirm_destroy, :admin, typecast_for_attachable_routing(attachable), attachment.becomes(Attachment)], class: "govuk-link govuk-link--no-visited-state gem-link--destructive", "aria-label": "Delete attachment: #{attachment.title}") %>
</div>
</li>
<% if attachment != attachable.attachments.includes(:attachment_data).last %>
Expand Down

0 comments on commit b080867

Please sign in to comment.