diff options
author | Julia Kirschenheuter <6078378+JuliaKirschenheuter@users.noreply.github.com> | 2022-07-28 15:59:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 15:59:47 +0200 |
commit | 532ea001a571078f643a70a906e15b32afebde6a (patch) | |
tree | 25a5ba440e23b0e479bf9e4e05af88fb8cb3364e | |
parent | ee23f41abe2fd53d00f44d9c16ebd722ac93e9a3 (diff) | |
parent | ef3fb2844680b383667ddf3e4fdab794ee38aaeb (diff) | |
download | nextcloud-server-532ea001a571078f643a70a906e15b32afebde6a.tar.gz nextcloud-server-532ea001a571078f643a70a906e15b32afebde6a.zip |
Merge pull request #33394 from nextcloud/fix/fix-370-Label_not_connected_to_form-element_in_file_listing
Connect ```input``` checkbox with corresponding file name via ```aria-describedby```
-rw-r--r-- | apps/files/js/filelist.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index b5bd1509d9f..4acefa6902b 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1694,7 +1694,7 @@ td.append( '<input id="select-' + this.id + '-' + fileData.id + - '" type="checkbox" class="selectCheckBox checkbox"/><label for="select-' + this.id + '-' + fileData.id + '">' + + '" type="checkbox" class="selectCheckBox checkbox" aria-describedby="innernametext_' + fileData.id + '" /><label for="select-' + this.id + '-' + fileData.id + '">' + '<span class="hidden-visually">' + (fileData.type === 'dir' ? t('files', 'Select directory "{dirName}"', {dirName: name}) : t('files', 'Select file "{fileName}"', {fileName: name})) + '</span>' + @@ -1744,8 +1744,9 @@ basename = name; extension = false; } - var nameSpan=$('<span></span>').addClass('nametext'); - var innernameSpan = $('<span></span>').addClass('innernametext').text(basename).prop('title', basename); + var nameSpan=$('<span></span>').addClass('nametext') + + var innernameSpan = $('<span></span>').addClass('innernametext').text(basename).prop('title', basename).prop('id', `innernametext_${fileData.id}`); var conflictingItems = this.$fileList.find('tr[data-file="' + this._jqSelEscape(name) + '"]'); |