Issue #1106344 by mgifford, BarisW: Taxonomy term reference field headers always should be rendered with a HTML header (invisible or not).
parent
a72877411d
commit
e04d6380cd
|
@ -630,7 +630,7 @@ function template_preprocess_field(&$variables, $hook) {
|
|||
// label, it needs to supply a preprocess function that sets it to the
|
||||
// sanitized element title or whatever else is wanted in its place.
|
||||
$variables['label_hidden'] = ($element['#label_display'] == 'hidden');
|
||||
$variables['label'] = $variables['label_hidden'] ? NULL : check_plain($element['#title']);
|
||||
$variables['label'] = check_plain($element['#title']);
|
||||
|
||||
// We want other preprocess functions and the theme implementation to have
|
||||
// fast access to the field item render arrays. The item render array keys
|
||||
|
|
|
@ -178,10 +178,9 @@ function bartik_menu_tree__shortcut_default($variables) {
|
|||
function bartik_field__taxonomy_term_reference($variables) {
|
||||
$output = '';
|
||||
|
||||
// Render the label, if it's not hidden.
|
||||
if (!$variables['label_hidden']) {
|
||||
$output .= '<h3 class="field-label">' . $variables['label'] . ': </h3>';
|
||||
}
|
||||
// Render the label either as a visible list or make it visually hidden for accessibility.
|
||||
$hidden_class = empty($variables['label_hidden']) ? '' : ' visually-hidden';
|
||||
$output .= '<h3 class="field-label' . $hidden_class . '">' . $variables['label'] . ': </h3>';
|
||||
|
||||
// Render the items.
|
||||
$output .= ($variables['element']['#label_display'] == 'inline') ? '<ul class="links inline">' : '<ul class="links">';
|
||||
|
|
Loading…
Reference in New Issue