Skip to content

Commit 808a61a

Browse files
Issue #1333292 by dcam, mgifford | Everett Zufelt: Screen-reader users receive no info about file upload errors.
1 parent 972e6a9 commit 808a61a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
Drupal 7.28, xxxx-xx-xx (development version)
33
-----------------------
4+
- Improved screen reader support by adding an aria-live HTML attribute to file
5+
upload fields when there is an error uploading the file (minor markup
6+
change).
47
- Made the pager on the Tracker module listing pages show the same number of
58
items as other pagers throughout Drupal core (minor UI change).
69
- Fixed a bug which caused caches not to be properly cleared when a file entity

modules/file/file.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Drupal.file = Drupal.file || {
8383
'%filename': this.value.replace('C:\\fakepath\\', ''),
8484
'%extensions': extensionPattern.replace(/\|/g, ', ')
8585
});
86-
$(this).closest('div.form-managed-file').prepend('<div class="messages error file-upload-js-error">' + error + '</div>');
86+
$(this).closest('div.form-managed-file').prepend('<div class="messages error file-upload-js-error" aria-live="polite">' + error + '</div>');
8787
this.value = '';
8888
return false;
8989
}

0 commit comments

Comments
 (0)