diff --git a/core/modules/editor/src/Form/EditorImageDialog.php b/core/modules/editor/src/Form/EditorImageDialog.php index 0e148d22f1103b3de8fca8f615cfdd86d23c9c4b..0de74e5b0c0133ef5f4575ec58046764f78b2f58 100644 --- a/core/modules/editor/src/Form/EditorImageDialog.php +++ b/core/modules/editor/src/Form/EditorImageDialog.php @@ -141,7 +141,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Editor $e } $form['attributes']['alt'] = [ '#title' => $this->t('Alternative text'), - '#placeholder' => $this->t('Short description for the visually impaired'), + '#description' => $this->t('Short description of the image used by screen readers and displayed when the image is not loaded. This is important for accessibility.'), '#type' => 'textfield', '#required' => TRUE, '#required_error' => $this->t('Alternative text is required.
(Only in rare cases should this be left empty. To create empty alternative text, enter "" — two double quotes without any content).'), diff --git a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php index 67a15a7d008423503dc03f081baf2ce7459642eb..b3aa0c9fa7b2bd6f0fe8dedf308826a55b69c505 100644 --- a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php +++ b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php @@ -263,7 +263,7 @@ public function fieldSettingsForm(array $form, FormStateInterface $form_state) { '#type' => 'checkbox', '#title' => t('Enable Alt field'), '#default_value' => $settings['alt_field'], - '#description' => t('The alt attribute may be used by search engines, screen readers, and when the image cannot be loaded. Enabling this field is recommended.'), + '#description' => t('Short description of the image used by screen readers and displayed when the image is not loaded. Enabling this field is recommended.'), '#weight' => 9, ]; $element['alt_field_required'] = [ @@ -433,7 +433,7 @@ protected function defaultImageForm(array &$element, array $settings) { $element['default_image']['alt'] = [ '#type' => 'textfield', '#title' => t('Alternative text'), - '#description' => t('This text will be used by screen readers, search engines, and when the image cannot be loaded.'), + '#description' => t('Short description of the image used by screen readers and displayed when the image is not loaded. This is important for accessibility.'), '#default_value' => $settings['default_image']['alt'], '#maxlength' => 512, ]; diff --git a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php index 16160b25c6cdeb97fd60c91be220c7d08e7587be..d7556b4ed6a85e30555fd7e583e550094519d9ee 100644 --- a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php +++ b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php @@ -263,7 +263,7 @@ public static function process($element, FormStateInterface $form_state, $form) '#title' => t('Alternative text'), '#type' => 'textfield', '#default_value' => isset($item['alt']) ? $item['alt'] : '', - '#description' => t('This text will be used by screen readers, search engines, or when the image cannot be loaded.'), + '#description' => t('Short description of the image used by screen readers and displayed when the image is not loaded. This is important for accessibility.'), // @see https://www.drupal.org/node/465106#alt-text '#maxlength' => 512, '#weight' => -12,