Issue #2292035 by DimitriV, mgifford | andrewmacpherson: Fixed CKEditor uses the automatically generated ID attribute for the body field in the ARIA label.

8.0.x
Alex Pott 2014-10-05 17:01:51 +02:00
parent ebdca18dc3
commit 1e727b3801
1 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,12 @@
format: format.format
};
// Set a title on the CKEditor instance that includes the text field's
// label so that screen readers say something that is understandable
// for end users.
var label = $('label[for=' + element.getAttribute('id') + ']').text();
format.editorSettings.title = Drupal.t("Rich Text Editor, !label field", {'!label': label});
// CKEditor initializes itself in a read-only state if the 'disabled'
// attribute is set. It does not respect the 'readonly' attribute,
// however, so we set the 'readOnly' configuration property manually in