Commit da1b134a authored by alexpott's avatar alexpott

Issue #1363112 by mparker17, mgifford, tlattimore, Jacine, dcmouyard,...

Issue #1363112 by mparker17, mgifford, tlattimore, Jacine, dcmouyard, bowersox, ry5n, ahdiaz: Simplify names of 'element-x' helper classes.
parent 0204ee8e
...@@ -2873,7 +2873,7 @@ function theme_fieldset($variables) { ...@@ -2873,7 +2873,7 @@ function theme_fieldset($variables) {
$legend_attributes = array(); $legend_attributes = array();
if (isset($element['#title_display']) && $element['#title_display'] == 'invisible') { if (isset($element['#title_display']) && $element['#title_display'] == 'invisible') {
$legend_attributes['class'][] = 'element-invisible'; $legend_attributes['class'][] = 'visually-hidden';
} }
$output = '<fieldset' . new Attribute($element['#attributes']) . '>'; $output = '<fieldset' . new Attribute($element['#attributes']) . '>';
...@@ -4805,7 +4805,7 @@ function theme_form_element_label($variables) { ...@@ -4805,7 +4805,7 @@ function theme_form_element_label($variables) {
} }
// Show label only to screen readers to avoid disruption in visual flows. // Show label only to screen readers to avoid disruption in visual flows.
elseif ($element['#title_display'] == 'invisible') { elseif ($element['#title_display'] == 'invisible') {
$attributes['class'] = 'element-invisible'; $attributes['class'] = 'visually-hidden';
} }
if (!empty($element['#id'])) { if (!empty($element['#id'])) {
......
...@@ -1662,7 +1662,7 @@ function theme_menu_local_task($variables) { ...@@ -1662,7 +1662,7 @@ function theme_menu_local_task($variables) {
if (!empty($variables['element']['#active'])) { if (!empty($variables['element']['#active'])) {
// Add text to indicate active tab for non-visual users. // Add text to indicate active tab for non-visual users.
$active = '<span class="element-invisible">' . t('(active tab)') . '</span>'; $active = '<span class="visually-hidden">' . t('(active tab)') . '</span>';
// If the link does not contain HTML already, check_plain() it now. // If the link does not contain HTML already, check_plain() it now.
// After we set 'html'=TRUE the link will not be sanitized by l(). // After we set 'html'=TRUE the link will not be sanitized by l().
...@@ -2304,13 +2304,13 @@ function theme_menu_local_tasks(&$variables) { ...@@ -2304,13 +2304,13 @@ function theme_menu_local_tasks(&$variables) {
$output = ''; $output = '';
if (!empty($variables['primary'])) { if (!empty($variables['primary'])) {
$variables['primary']['#prefix'] = '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>'; $variables['primary']['#prefix'] = '<h2 class="visually-hidden">' . t('Primary tabs') . '</h2>';
$variables['primary']['#prefix'] .= '<ul class="tabs primary">'; $variables['primary']['#prefix'] .= '<ul class="tabs primary">';
$variables['primary']['#suffix'] = '</ul>'; $variables['primary']['#suffix'] = '</ul>';
$output .= drupal_render($variables['primary']); $output .= drupal_render($variables['primary']);
} }
if (!empty($variables['secondary'])) { if (!empty($variables['secondary'])) {
$variables['secondary']['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>'; $variables['secondary']['#prefix'] = '<h2 class="visually-hidden">' . t('Secondary tabs') . '</h2>';
$variables['secondary']['#prefix'] .= '<ul class="tabs secondary">'; $variables['secondary']['#prefix'] .= '<ul class="tabs secondary">';
$variables['secondary']['#suffix'] = '</ul>'; $variables['secondary']['#suffix'] = '</ul>';
$output .= drupal_render($variables['secondary']); $output .= drupal_render($variables['secondary']);
......
...@@ -309,7 +309,7 @@ function theme_pager($variables) { ...@@ -309,7 +309,7 @@ function theme_pager($variables) {
'#markup' => $li_last, '#markup' => $li_last,
); );
} }
return '<h2 class="element-invisible">' . t('Pages') . '</h2>' . theme('item_list', array( return '<h2 class="visually-hidden">' . t('Pages') . '</h2>' . theme('item_list', array(
'items' => $items, 'items' => $items,
'attributes' => array('class' => array('pager')), 'attributes' => array('class' => array('pager')),
)); ));
......
...@@ -1651,7 +1651,7 @@ function theme_status_messages($variables) { ...@@ -1651,7 +1651,7 @@ function theme_status_messages($variables) {
foreach (drupal_get_messages($display) as $type => $messages) { foreach (drupal_get_messages($display) as $type => $messages) {
$output .= "<div class=\"messages messages--$type\">\n"; $output .= "<div class=\"messages messages--$type\">\n";
if (!empty($status_heading[$type])) { if (!empty($status_heading[$type])) {
$output .= '<h2 class="element-invisible">' . $status_heading[$type] . "</h2>\n"; $output .= '<h2 class="visually-hidden">' . $status_heading[$type] . "</h2>\n";
} }
if (count($messages) > 1) { if (count($messages) > 1) {
$output .= " <ul class=\"messages__list\">\n"; $output .= " <ul class=\"messages__list\">\n";
...@@ -1716,7 +1716,7 @@ function theme_link($variables) { ...@@ -1716,7 +1716,7 @@ function theme_link($variables) {
* When using a string it will be used as the text of the heading and the * When using a string it will be used as the text of the heading and the
* level will default to 'h2'. Headings should be used on navigation menus * level will default to 'h2'. Headings should be used on navigation menus
* and any list of links that consistently appears on multiple pages. To * and any list of links that consistently appears on multiple pages. To
* make the heading invisible use the 'element-invisible' CSS class. Do not * make the heading invisible use the 'visually-hidden' CSS class. Do not
* use 'display:none', which removes it from screen-readers and assistive * use 'display:none', which removes it from screen-readers and assistive
* technology. Headings allow screen-reader and keyboard only users to * technology. Headings allow screen-reader and keyboard only users to
* navigate to or skip the links. See * navigate to or skip the links. See
...@@ -1884,8 +1884,8 @@ function theme_breadcrumb($variables) { ...@@ -1884,8 +1884,8 @@ function theme_breadcrumb($variables) {
if (!empty($breadcrumb)) { if (!empty($breadcrumb)) {
$output .= '<nav role="navigation" class="breadcrumb">'; $output .= '<nav role="navigation" class="breadcrumb">';
// Provide a navigational heading to give context for breadcrumb links to // Provide a navigational heading to give context for breadcrumb links to
// screen-reader users. Make the heading invisible with .element-invisible. // screen-reader users. Make the heading invisible with .visually-hidden.
$output .= '<h2 class="element-invisible">' . t('You are here') . '</h2>'; $output .= '<h2 class="visually-hidden">' . t('You are here') . '</h2>';
$output .= '<ol><li>' . implode('</li><li>', $breadcrumb) . '</li></ol>'; $output .= '<ol><li>' . implode('</li><li>', $breadcrumb) . '</li></ol>';
$output .= '</nav>'; $output .= '</nav>';
} }
...@@ -2817,7 +2817,7 @@ function template_preprocess_page(&$variables) { ...@@ -2817,7 +2817,7 @@ function template_preprocess_page(&$variables) {
), ),
'#heading' => array( '#heading' => array(
'text' => t('Main menu'), 'text' => t('Main menu'),
'class' => array('element-invisible'), 'class' => array('visually-hidden'),
) )
); );
} }
...@@ -2831,7 +2831,7 @@ function template_preprocess_page(&$variables) { ...@@ -2831,7 +2831,7 @@ function template_preprocess_page(&$variables) {
), ),
'#heading' => array( '#heading' => array(
'text' => t('Secondary menu'), 'text' => t('Secondary menu'),
'class' => array('element-invisible'), 'class' => array('visually-hidden'),
) )
); );
} }
......
...@@ -123,7 +123,7 @@ function theme_task_list($variables) { ...@@ -123,7 +123,7 @@ function theme_task_list($variables) {
$active = $variables['active']; $active = $variables['active'];
$done = isset($items[$active]) || $active == NULL; $done = isset($items[$active]) || $active == NULL;
$output = '<h2 class="element-invisible">Installation tasks</h2>'; $output = '<h2 class="visually-hidden">Installation tasks</h2>';
$output .= '<ol class="task-list">'; $output .= '<ol class="task-list">';
foreach ($items as $k => $item) { foreach ($items as $k => $item) {
...@@ -139,7 +139,7 @@ function theme_task_list($variables) { ...@@ -139,7 +139,7 @@ function theme_task_list($variables) {
$output .= '<li'; $output .= '<li';
$output .= ($class ? ' class="' . $class . '"' : '') . '>'; $output .= ($class ? ' class="' . $class . '"' : '') . '>';
$output .= $item; $output .= $item;
$output .= ($status ? '<span class="element-invisible">' . $status . '</span>' : ''); $output .= ($status ? '<span class="visually-hidden">' . $status . '</span>' : '');
$output .= '</li>'; $output .= '</li>';
} }
$output .= '</ol>'; $output .= '</ol>';
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
if (!liveElement) { if (!liveElement) {
liveElement = document.createElement('div'); liveElement = document.createElement('div');
liveElement.id = 'drupal-live-announce'; liveElement.id = 'drupal-live-announce';
liveElement.className = 'element-invisible'; liveElement.className = 'visually-hidden';
liveElement.setAttribute('aria-live', 'polite'); liveElement.setAttribute('aria-live', 'polite');
liveElement.setAttribute('aria-busy', 'false'); liveElement.setAttribute('aria-busy', 'false');
document.body.appendChild(liveElement); document.body.appendChild(liveElement);
......
...@@ -19,7 +19,7 @@ Drupal.behaviors.autocomplete = { ...@@ -19,7 +19,7 @@ Drupal.behaviors.autocomplete = {
$($input[0].form).submit(Drupal.autocompleteSubmit); $($input[0].form).submit(Drupal.autocompleteSubmit);
$input.parent() $input.parent()
.attr('role', 'application') .attr('role', 'application')
.append($('<span class="element-invisible" aria-live="assertive"></span>') .append($('<span class="visually-hidden" aria-live="assertive"></span>')
.attr('id', $input[0].id + '-autocomplete-aria-live') .attr('id', $input[0].id + '-autocomplete-aria-live')
); );
new Drupal.jsAC($input, acdb[uri]); new Drupal.jsAC($input, acdb[uri]);
......
...@@ -60,7 +60,7 @@ $.extend(CollapsibleDetails.prototype, { ...@@ -60,7 +60,7 @@ $.extend(CollapsibleDetails.prototype, {
// Turn the summary into a clickable link. // Turn the summary into a clickable link.
var $legend = this.$node.find('> summary'); var $legend = this.$node.find('> summary');
$('<span class="details-summary-prefix element-invisible"></span>') $('<span class="details-summary-prefix visually-hidden"></span>')
.append(this.$node.attr('open') ? Drupal.t('Hide') : Drupal.t('Show')) .append(this.$node.attr('open') ? Drupal.t('Hide') : Drupal.t('Show'))
.prependTo($legend) .prependTo($legend)
.after(' '); .after(' ');
......
...@@ -154,7 +154,7 @@ $.extend(Drupal.theme, { ...@@ -154,7 +154,7 @@ $.extend(Drupal.theme, {
* A string representing a DOM fragment. * A string representing a DOM fragment.
*/ */
dropbuttonToggle: function (options) { dropbuttonToggle: function (options) {
return '<li class="dropbutton-toggle"><button type="button" role="button"><span class="dropbutton-arrow"><span class="element-invisible">' + options.title + '</span></span></button></li>'; return '<li class="dropbutton-toggle"><button type="button" role="button"><span class="dropbutton-arrow"><span class="visually-hidden">' + options.title + '</span></span></button></li>';
} }
}); });
......
...@@ -132,7 +132,7 @@ Drupal.verticalTab.prototype = { ...@@ -132,7 +132,7 @@ Drupal.verticalTab.prototype = {
this.item.addClass('selected'); this.item.addClass('selected');
// Mark the active tab for screen readers. // Mark the active tab for screen readers.
$('#active-vertical-tab').remove(); $('#active-vertical-tab').remove();
this.link.append('<span id="active-vertical-tab" class="element-invisible">' + Drupal.t('(active tab)') + '</span>'); this.link.append('<span id="active-vertical-tab" class="visually-hidden">' + Drupal.t('(active tab)') + '</span>');
}, },
/** /**
......
...@@ -20,5 +20,5 @@ ...@@ -20,5 +20,5 @@
<h3>{{ title }}</h3> <h3>{{ title }}</h3>
{{ summary_list }} {{ summary_list }}
<div class="links"> <div class="links">
<a href="{{ source_url }}">{{ 'More<span class="element-invisible"> posts about %title</span>'|t({ '%title': title }) }}</a> <a href="{{ source_url }}">{{ 'More<span class="visually-hidden"> posts about %title</span>'|t({ '%title': title }) }}</a>
</div> </div>
...@@ -101,7 +101,7 @@ public function form(array $form, array &$form_state) { ...@@ -101,7 +101,7 @@ public function form(array $form, array &$form_state) {
); );
$form['visibility']['path']['pages'] = array( $form['visibility']['path']['pages'] = array(
'#type' => 'textarea', '#type' => 'textarea',
'#title' => '<span class="element-invisible">' . $title . '</span>', '#title' => '<span class="visually-hidden">' . $title . '</span>',
'#default_value' => !empty($visibility['path']['pages']) ? $visibility['path']['pages'] : '', '#default_value' => !empty($visibility['path']['pages']) ? $visibility['path']['pages'] : '',
'#description' => $description, '#description' => $description,
); );
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<nav id="book-navigation-{{ book_id }}" class="book-navigation"> <nav id="book-navigation-{{ book_id }}" class="book-navigation">
{{ tree }} {{ tree }}
{% if has_links %} {% if has_links %}
<h2 class="element-invisible">{{ 'Book Navigation'|t }}</h2> <h2 class="visually-hidden">{{ 'Book Navigation'|t }}</h2>
<ul class="book-pager"> <ul class="book-pager">
{% if prev_url %} {% if prev_url %}
<li class="previous"> <li class="previous">
......
...@@ -124,7 +124,7 @@ function theme_ckeditor_settings_toolbar($variables) { ...@@ -124,7 +124,7 @@ function theme_ckeditor_settings_toolbar($variables) {
// aria-live region for outputing aural information about the state of the // aria-live region for outputing aural information about the state of the
// configuration. // configuration.
$output .= '<div id="ckeditor-button-configuration-aria-live" class="element-invisible" aria-live="polite"></div>'; $output .= '<div id="ckeditor-button-configuration-aria-live" class="visually-hidden" aria-live="polite"></div>';
$output .= '<div id="ckeditor-button-description" class="fieldset-description">' . t('Move a button into the <em>Active toolbar</em> to enable it, or into the list of <em>Available buttons</em> to disable it. Use dividers to create button groups. Buttons may be moved with the mouse or keyboard arrow keys.') . '</div>'; $output .= '<div id="ckeditor-button-description" class="fieldset-description">' . t('Move a button into the <em>Active toolbar</em> to enable it, or into the list of <em>Available buttons</em> to disable it. Use dividers to create button groups. Buttons may be moved with the mouse or keyboard arrow keys.') . '</div>';
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
* 'parent_author' and 'parent_created' during template_preprocess_comment(). * 'parent_author' and 'parent_created' during template_preprocess_comment().
* This information is presented to help screen readers follow lengthy * This information is presented to help screen readers follow lengthy
* discussion threads. You can hide this from sighted users using the class * discussion threads. You can hide this from sighted users using the class
* element-invisible. * visually-hidden.
* *
* These two variables are provided for context: * These two variables are provided for context:
* - comment: Full comment object. * - comment: Full comment object.
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
reader without this information. reader without this information.
#} #}
{% if parent %} {% if parent %}
<p class="parent element-invisible">{{ parent }}</p> <p class="parent visually-hidden">{{ parent }}</p>
{% endif %} {% endif %}
{{ permalink }} {{ permalink }}
......
...@@ -91,11 +91,11 @@ function adjustIfNestedAndOverlapping ($contextual) { ...@@ -91,11 +91,11 @@ function adjustIfNestedAndOverlapping ($contextual) {
// Retrieve height of nested contextual link. // Retrieve height of nested contextual link.
var height = 0; var height = 0;
var $trigger = $nestedContextual.find('.trigger'); var $trigger = $nestedContextual.find('.trigger');
// Elements with the .element-invisible class have no dimensions, so this // Elements with the .visually-hidden class have no dimensions, so this
// class must be temporarily removed to the calculate the height. // class must be temporarily removed to the calculate the height.
$trigger.removeClass('element-invisible'); $trigger.removeClass('visually-hidden');
height = $nestedContextual.height(); height = $nestedContextual.height();
$trigger.addClass('element-invisible'); $trigger.addClass('visually-hidden');
// Adjust nested contextual link's position. // Adjust nested contextual link's position.
$nestedContextual.css({ top: $nestedContextual.position().top + height }); $nestedContextual.css({ top: $nestedContextual.position().top + height });
...@@ -275,7 +275,7 @@ Drupal.contextual = { ...@@ -275,7 +275,7 @@ Drupal.contextual = {
// The open state determines if the links are visible. // The open state determines if the links are visible.
.toggleClass('open', isOpen) .toggleClass('open', isOpen)
// Update the visibility of the trigger. // Update the visibility of the trigger.
.find('.trigger').toggleClass('element-invisible', !isVisible); .find('.trigger').toggleClass('visually-hidden', !isVisible);
// Nested contextual region handling: hide any nested contextual triggers. // Nested contextual region handling: hide any nested contextual triggers.
if ('isOpen' in this.model.changed) { if ('isOpen' in this.model.changed) {
...@@ -411,7 +411,7 @@ Drupal.contextual.collection = new Backbone.Collection([], { model: Drupal.conte ...@@ -411,7 +411,7 @@ Drupal.contextual.collection = new Backbone.Collection([], { model: Drupal.conte
* A string representing a DOM fragment. * A string representing a DOM fragment.
*/ */
Drupal.theme.contextualTrigger = function () { Drupal.theme.contextualTrigger = function () {
return '<button class="trigger element-invisible element-focusable" type="button"></button>'; return '<button class="trigger visually-hidden focusable" type="button"></button>';
}; };
})(jQuery, Drupal, drupalSettings, Backbone, Modernizr); })(jQuery, Drupal, drupalSettings, Backbone, Modernizr);
...@@ -40,7 +40,7 @@ function contextual_toolbar() { ...@@ -40,7 +40,7 @@ function contextual_toolbar() {
), ),
), ),
'#wrapper_attributes' => array( '#wrapper_attributes' => array(
'class' => array('element-hidden', 'contextual-toolbar-tab'), 'class' => array('hidden', 'contextual-toolbar-tab'),
), ),
'#attached' => array( '#attached' => array(
'library' => array( 'library' => array(
......
...@@ -150,7 +150,7 @@ Drupal.contextualToolbar = { ...@@ -150,7 +150,7 @@ Drupal.contextualToolbar = {
*/ */
render: function () { render: function () {
// Render the visibility. // Render the visibility.
this.$el.toggleClass('element-hidden', !this.model.get('isVisible')); this.$el.toggleClass('hidden', !this.model.get('isVisible'));
// Render the state. // Render the state.
this.$el.find('button').toggleClass('active', !this.model.get('isViewing')); this.$el.find('button').toggleClass('active', !this.model.get('isViewing'));
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
position: relative; position: relative;
} }
.contextual .trigger:focus { .contextual .trigger:focus {
/* Override the .element-focusable position: static */ /* Override the .focusable position: static */
position: relative !important; position: relative !important;
} }
.contextual-links { .contextual-links {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 13px; border-radius: 13px;
box-shadow: 1px 1px 2px rgba(0,0,0,0.3); box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
/* Override the .element-focusable height: auto */ /* Override the .focusable height: auto */
height: 28px !important; height: 28px !important;
float: right; /* LTR */ float: right; /* LTR */
margin: 0; margin: 0;
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
padding: 0 2px; padding: 0 2px;
position: relative; position: relative;
right: 2px; /* LTR */ right: 2px; /* LTR */
/* Override the .element-focusable height: auto */ /* Override the .focusable height: auto */
width: 28px !important; width: 28px !important;
text-indent: -9999px; text-indent: -9999px;
cursor: pointer; cursor: pointer;
......
...@@ -32,6 +32,6 @@ ...@@ -32,6 +32,6 @@
} }
/* @todo get rid of this declaration by making toolbar.module's CSS less specific */ /* @todo get rid of this declaration by making toolbar.module's CSS less specific */
.js .toolbar .bar .contextual-toolbar-tab.tab.element-hidden { .js .toolbar .bar .contextual-toolbar-tab.tab.hidden {
display: none; display: none;
} }
...@@ -279,7 +279,7 @@ function loadMissingEditors (callback) { ...@@ -279,7 +279,7 @@ function loadMissingEditors (callback) {
// @todo Simplify this once https://drupal.org/node/1533366 lands. // @todo Simplify this once https://drupal.org/node/1533366 lands.
var id = 'edit-load-editors'; var id = 'edit-load-editors';
// Create a temporary element to be able to use Drupal.ajax. // Create a temporary element to be able to use Drupal.ajax.
var $el = $('<div id="' + id + '" class="element-hidden"></div>').appendTo('body'); var $el = $('<div id="' + id + '" class="hidden"></div>').appendTo('body');
// Create a Drupal.ajax instance to load the form. // Create a Drupal.ajax instance to load the form.
Drupal.ajax[id] = new Drupal.ajax(id, $el, { Drupal.ajax[id] = new Drupal.ajax(id, $el, {
url: Drupal.url('edit/attachments'), url: Drupal.url('edit/attachments'),
......
...@@ -429,7 +429,7 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL, ...@@ -429,7 +429,7 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL,
// spinners will be added manually by the client-side script. // spinners will be added manually by the client-side script.
'progress' => 'none', 'progress' => 'none',
), ),
'#attributes' => array('class' => array('element-invisible')) '#attributes' => array('class' => array('visually-hidden'))
); );
$form['actions'] = array('#type' => 'actions'); $form['actions'] = array('#type' => 'actions');
......
...@@ -1088,7 +1088,7 @@ function template_preprocess_forum_list(&$variables) { ...@@ -1088,7 +1088,7 @@ function template_preprocess_forum_list(&$variables) {
if ($user->uid) { if ($user->uid) {
$variables['forums'][$id]->new_topics = _forum_topics_unread($forum->id(), $user->uid); $variables['forums'][$id]->new_topics = _forum_topics_unread($forum->id(), $user->uid);
if ($variables['forums'][$id]->new_topics) { if ($variables['forums'][$id]->new_topics) {
$variables['forums'][$id]->new_text = format_plural($variables['forums'][$id]->new_topics, '1 new post<span class="element-invisible"> in forum %title</span>', '@count new posts<span class="element-invisible"> in forum %title</span>', array('%title' => $variables['forums'][$id]->label())); $variables['forums'][$id]->new_text = format_plural($variables['forums'][$id]->new_topics, '1 new post<span class="visually-hidden"> in forum %title</span>', '@count new posts<span class="visually-hidden"> in forum %title</span>', array('%title' => $variables['forums'][$id]->label()));
$variables['forums'][$id]->new_url = url('forum/' . $forum->id(), array('fragment' => 'new')); $variables['forums'][$id]->new_url = url('forum/' . $forum->id(), array('fragment' => 'new'));
$variables['forums'][$id]->icon_class = 'new'; $variables['forums'][$id]->icon_class = 'new';
$variables['forums'][$id]->icon_title = t('New posts'); $variables['forums'][$id]->icon_title = t('New posts');
...@@ -1163,7 +1163,7 @@ function template_preprocess_forum_topic_list(&$variables) { ...@@ -1163,7 +1163,7 @@ function template_preprocess_forum_topic_list(&$variables) {
$variables['topics'][$id]->new_text = ''; $variables['topics'][$id]->new_text = '';
$variables['topics'][$id]->new_url = ''; $variables['topics'][$id]->new_url = '';
if ($topic->new_replies) { if ($topic->new_replies) {
$variables['topics'][$id]->new_text = format_plural($topic->new_replies, '1 new post<span class="element-invisible"> in topic %title</span>', '@count new posts<span class="element-invisible"> in topic %title</span>', array('%title' => $variables['topics'][$id]->title)); $variables['topics'][$id]->new_text = format_plural($topic->new_replies, '1 new post<span class="visually-hidden"> in topic %title</span>', '@count new posts<span class="visually-hidden"> in topic %title</span>', array('%title' => $variables['topics'][$id]->title));
$variables['topics'][$id]->new_url = url("node/$topic->nid", array('query' => comment_new_page_count($topic->comment_count, $topic->new_replies, $topic), 'fragment' => 'new')); $variables['topics'][$id]->new_url = url("node/$topic->nid", array('query' => comment_new_page_count($topic->comment_count, $topic->new_replies, $topic), 'fragment' => 'new'));
} }
......
...@@ -22,5 +22,5 @@ ...@@ -22,5 +22,5 @@
{% if first_new -%} {% if first_new -%}
<a id="new"></a> <a id="new"></a>
{%- endif %} {%- endif %}
<span class="element-invisible">{{ icon_title }}</span> <span class="visually-hidden">{{ icon_title }}</span>
</div> </div>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#} #}
{% for i in 1..forum.depth if forum.depth > 0 %}<div class="indent">{% endfor %} {% for i in 1..forum.depth if forum.depth > 0 %}<div class="indent">{% endfor %}
<div class="icon forum-status-{{ forum.icon_class }}" title="{{ forum.icon_title }}"> <div class="icon forum-status-{{ forum.icon_class }}" title="{{ forum.icon_title }}">
<span class="element-invisible">{{ forum.icon_title }}</span> <span class="visually-hidden">{{ forum.icon_title }}</span>
</div> </div>
<div class="name"><a href="{{ forum.link }}">{{ forum.label }}</a></div> <div class="name"><a href="{{ forum.link }}">{{ forum.label }}</a></div>
{% if forum.description.value %} {% if forum.description.value %}
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
*/ */
#} #}
<div class="inner" tabindex="0" role="button"> <div class="inner" tabindex="0" role="button">
<span class="update-description-prefix element-invisible">Show description</span> <span class="update-description-prefix visually-hidden">Show description</span>
{% if modules %} {% if modules %}
<span class="text">{{ 'Updates for: @modules'|t({'@modules': modules|join(', ')}) }}</span> <span class="text">{{ 'Updates for: @modules'|t({'@modules': modules|join(', ')}) }}</span>
{% elseif missing_updates_status %} {% elseif missing_updates_status %}
......
...@@ -46,7 +46,7 @@ public function buildContent(array $entities, array $displays, $view_mode, $lang ...@@ -46,7 +46,7 @@ public function buildContent(array $entities, array $displays, $view_mode, $lang
if ($view_mode == 'teaser') { if ($view_mode == 'teaser') {
$node_title_stripped = strip_tags($entity->label()); $node_title_stripped = strip_tags($entity->label());
$links['node-readmore'] = array( $links['node-readmore'] = array(
'title' => t('Read more<span class="element-invisible"> about @title</span>', array( 'title' => t('Read more<span class="visually-hidden"> about @title</span>', array(
'@title' => $node_title_stripped, '@title' => $node_title_stripped,
)), )),
'href' => 'node/' . $entity->nid, 'href' => 'node/' . $entity->nid,
......
...@@ -57,7 +57,7 @@ function testPageEdit() { ...@@ -57,7 +57,7 @@ function testPageEdit() {
$this->assertEqual($edit_url, $actual_url, 'On edit page.'); $this->assertEqual($edit_url, $actual_url, 'On edit page.');
// Check that the title and body fields are displayed with the correct values. // Check that the title and body fields are displayed with the correct values.
$active = '<span class="element-invisible">' . t('(active tab)') . '</span>'; $active = '<span class="visually-hidden">' . t('(active tab)') . '</span>';
$link_text = t('!local-task-title!active', array('!local-task-title' => t('Edit'), '!active' => $active)); $link_text = t('!local-task-title!active', array('!local-task-title' => t('Edit'), '!active' => $active));
$this->assertText(strip_tags($link_text), 0, 'Edit tab found and marked active.'); $this->assertText(strip_tags($link_text), 0, 'Edit tab found and marked active.');
$this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.'); $this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.');
......
...@@ -43,7 +43,7 @@ html.overlay-open .displace-bottom { ...@@ -43,7 +43,7 @@ html.overlay-open .displace-bottom {