Commit 990ec23b authored by alexpott's avatar alexpott

Issue #2227601 by mparker17: Added [Follow-up] Add a Visually-hidden field label formatter.

parent 1c7cf179
......@@ -2379,7 +2379,7 @@ function template_preprocess_field(&$variables, $hook) {
}
// Hide labels visually, but display them to screenreaders if applicable.
if ($element['#label_display'] == 'visually-hidden') {
if ($element['#label_display'] == 'visually_hidden') {
$variables['title_attributes']['class'][] = 'visually-hidden';
}
......
......@@ -148,9 +148,9 @@ function testFieldItemListView() {
}
$this->assertText($setting . '|' . implode('|', $array), 'Values were displayed with expected setting.');
// Display settings: Check visually-hidden field.
// Display settings: Check visually_hidden field.
$display = array(
'label' => 'visually-hidden',
'label' => 'visually_hidden',
'type' => 'field_test_multiple',
'settings' => array(
'test_formatter_setting_multiple' => $this->randomName(),
......
......@@ -226,7 +226,7 @@ protected function getFieldLabelOptions() {
'above' => $this->t('Above'),
'inline' => $this->t('Inline'),
'hidden' => '- ' . $this->t('Hidden') . ' -',
'visually-hidden' => '- ' . $this->t('Visually Hidden') . ' -',
'visually_hidden' => '- ' . $this->t('Visually Hidden') . ' -',
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment