summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2013-10-11 14:34:17 (GMT)
committerwebchick2013-10-11 14:34:17 (GMT)
commit7a17c8253329833dcc1b525466ae5b2017f11bc9 (patch)
treed69b1e3a37b2dc6a6757736a127d27a6a6e2e73f
parent3921d7001b1ea60f0279ddaf630dc693a5138989 (diff)
Issue #1993894 by mgifford, Jelle_S, Wim Leers | jessebeach: Contextual quick edit toggle should be a <a role='button'> not a <a> because it tracks on/off state.
-rw-r--r--core/modules/edit/js/edit.js2
-rw-r--r--core/modules/edit/js/views/ContextualLinkView.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/core/modules/edit/js/edit.js b/core/modules/edit/js/edit.js
index ee75da0..dab4522 100644
--- a/core/modules/edit/js/edit.js
+++ b/core/modules/edit/js/edit.js
@@ -390,7 +390,7 @@ function initializeEntityContextualLink (contextualLink) {
var initContextualLink = _.once(function () {
var $links = $(contextualLink.el).find('.contextual-links');
var contextualLinkView = new Drupal.edit.ContextualLinkView($.extend({
- el: $('<li class="quick-edit"><a href=""></a></li>').prependTo($links),
+ el: $('<li class="quick-edit"><a href="" role="button" aria-pressed="false"></a></li>').prependTo($links),
model: entityModel,
appModel: Drupal.edit.app.model
}, options));
diff --git a/core/modules/edit/js/views/ContextualLinkView.js b/core/modules/edit/js/views/ContextualLinkView.js
index 2b48b46..514ace0 100644
--- a/core/modules/edit/js/views/ContextualLinkView.js
+++ b/core/modules/edit/js/views/ContextualLinkView.js
@@ -45,6 +45,8 @@ Drupal.edit.ContextualLinkView = Backbone.View.extend({
* {@inheritdoc}
*/
render: function (entityModel, isActive) {
+ this.$el.find('a').attr('aria-pressed', isActive);
+
// Hides the contextual links if an in-place editor is active.
this.$el.closest('.contextual').toggle(!isActive);