Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

This change is related to #2121775: Make the markup associated with the required star on field items silent.

Previously, a required field was indicated by a star (asterisk) character appended to the label of a field.

Screenshot of the Article creation form. The title field is visible with an asterisk to the right of the Title field label. A callout indicates that the field title is read as title star.

With the previous code, a screen reader would have read the title field label like this:

title star required edit-text

Note that the word "star" is pronounced because it is a character in the abbr element. So we have changed the abbr element to a span element and hidden it with aria-hidden. Now the title field label is read like this:

title required edit-text

The theme_form_required_marker theme function has been changed in this patch. Specifically:

function theme_form_required_marker($variables) {
  $attributes = array(
    'class' => 'form-required',
-    'title' => t('This field is required.'),
+    'aria-hidden' => 'true',
   );
-  return '<abbr' . new Attribute($attributes) . '>*</abbr>';
+  return '<span' . new Attribute($attributes) . '>*</span>';
}

CSS targeting just the class .form-required will not need to be changed. If you referenced the HTML element as well such as abbr.form-required, you can either remove the reference to the HTML element or change it to a span.

Impacts: 
Module developers
Themers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done