Skip to content
Snippets Groups Projects
Commit 03327aca authored by Moritz Strohm's avatar Moritz Strohm Committed by David Siegfried
Browse files

avatar/update: made "select" button accessible

parent d593a94d
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@
) ?>
</p>
<a onclick="javascript:void 0" class=button><?= _('Auswählen') ?></a>
<a class="button" tabindex="0"><?= _('Auswählen') ?></a>
</label>
<input type="hidden" name="cropped-image" id="cropped-image" value="">
......
......@@ -43,4 +43,13 @@ STUDIP.domReady(() => {
});
});
}
//"Redirecting" the event is necessary so that the avatar image upload
//is accessible by pressing the enter key when its focused.
jQuery(document).on('keydown', 'form.settings-avatar label.file-upload a.button', function(event) {
if (event.code == "Enter") {
//The enter key has been pressed.
jQuery(this).parent('.file-upload').trigger('click');
}
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment