Skip to content

Commit

Permalink
Merge pull request ckan#7305 from robin-NEC/robin-NEC-patch-10
Browse files Browse the repository at this point in the history
[7227] Autofocus the `upload` button when page is rendered
  • Loading branch information
amercader authored Mar 9, 2023
2 parents 4bfc77a + f4df8bd commit 8c1ee7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/7227.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Autofocus the upload button for keyboard accessibility.
2 changes: 1 addition & 1 deletion ckan/templates/package/snippets/resource_upload_field.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
onclick="
document.getElementById('resource-url-upload').checked = true;
document.getElementById('field-resource-upload').click();
"><i class="fa fa-cloud-upload"></i>{{ _("Upload") }}</button>
"autofocus="true"><i class="fa fa-cloud-upload"></i>{{ _("Upload") }}</button>
{% endif %}
<button type="button" class="btn btn-default" id="resource-link-button"
title="{{ _('Link to a URL on the internet (you can also link to an API)') }}"
Expand Down

0 comments on commit 8c1ee7b

Please sign in to comment.