aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js8
2 files changed, 8 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b3b0b3c8d..d17864f46 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
- Improved 403 message, especially for private reports.
- Mobile users can now filter the pins on the `/around` map view. #2366
- Maintain whitespace formatting in email report/update lists.
+ - Improve keyboard accessibility.
- Admin improvements:
- Add new roles system, to group permissions and apply to users.
- New features:
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 2f0a48385..6352ac4dc 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -630,7 +630,7 @@ $.extend(fixmystreet.set_up, {
var $context = $(this);
var $originalLabel = $('[for="form_photo"], .js-photo-label', $context);
var $originalInput = $('#form_photos, .js-photo-fields', $context);
- var $dropzone = $('<div>').addClass('dropzone');
+ var $dropzone = $('<div tabindex=0>').addClass('dropzone');
$originalLabel.removeAttr('for');
$('[data-plural]', $originalLabel).text(
@@ -698,6 +698,12 @@ $.extend(fixmystreet.set_up, {
}
});
+ $dropzone.on('keydown', function(e) {
+ if (e.keyCode === 13 || e.keyCode === 32) {
+ $dropzone.click();
+ }
+ });
+
$.each($('input[name=upload_fileid]', $context).val().split(','), function(i, f) {
if (!f) {
return;