Commit 9dfc2d82 authored by Dries's avatar Dries

Issue #1905340 by plopesc, Wim Leers: Fixed Contextual Links Needs Title to be...

Issue #1905340 by plopesc, Wim Leers: Fixed Contextual Links Needs Title to be Included in 'Open configuration options button'.
parent b40ef7df
......@@ -57,8 +57,10 @@ Drupal.contextual.prototype.init = function() {
// Create and append the contextual links trigger.
var action = Drupal.t('Open');
var parentBlock = this.$region.find('h2').first().text();
this.$trigger = $(Drupal.theme.contextualTrigger())
.text(Drupal.t('@action configuration options', {'@action': action}))
.text(Drupal.t('@action @parent configuration options', {'@action': action, '@parent': parentBlock}))
// Set the aria-pressed state.
.attr('aria-pressed', false)
.prependTo(this.$wrapper);
......@@ -151,8 +153,9 @@ Drupal.contextual.prototype.showLinks = function(show) {
this.$wrapper.toggleClass('contextual-links-active', show);
var isOpen = this.$wrapper.hasClass('contextual-links-active');
var action = (isOpen) ? Drupal.t('Close') : Drupal.t('Open');
var parentBlock = this.$region.find('h2').first().text();
this.$trigger
.text(Drupal.t('@action configuration options', {'@action': action}))
.text(Drupal.t('@action @parent configuration options', {'@action': action, '@parent': parentBlock}))
// Set the aria-pressed state.
.attr('aria-pressed', isOpen);
// Mark the links as hidden if they are.
......
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