diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-12-18 15:52:42 +0100 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-12-18 15:52:42 +0100 |
commit | 137d19f6b123d6697464f740dc1ff02e90a229c6 (patch) | |
tree | 440398797d0fcd0209f7302c500772b1b8e16fd0 /apps | |
parent | 7e5fbde4cdb6e607296d4ed9b48db51f641472d1 (diff) | |
download | nextcloud-server-137d19f6b123d6697464f740dc1ff02e90a229c6.tar.gz nextcloud-server-137d19f6b123d6697464f740dc1ff02e90a229c6.zip |
fix accessibility for 'New' file inputs
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/file-upload.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index b5c8391e802..a67a3598820 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -574,10 +574,15 @@ OC.Upload = { var form = $('<form></form>'); var input = $('<input type="text">'); var newName = $(this).attr('data-newname') || ''; + var fileType = 'input-' + $(this).attr('data-type'); if (newName) { input.val(newName); + input.attr('id', fileType); } - form.append(input); + var label = $('<label class="hidden-visually" for="">' + newName + '</label>'); + label.attr('for', fileType); + + form.append(label).append(input); $(this).append(form); var lastPos; var checkInput = function () { |