Bug 1532071 - call formatAccessKey when inheriting accesskey attributes into labels, r=jaws
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 05 Mar 2019 15:30:00 +0000
changeset 520260 2ff1c636903d3f14e1c0aaf1fda56791033a27ea
parent 520259 d7643c689d07380b594ae798cd575e4e3caa9bd8
child 520261 c76f213ca5bd7db75e82d490eba53ef7427a750c
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1532071
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532071 - call formatAccessKey when inheriting accesskey attributes into labels, r=jaws Differential Revision: https://phabricator.services.mozilla.com/D22102
toolkit/content/customElements.js
--- a/toolkit/content/customElements.js
+++ b/toolkit/content/customElements.js
@@ -209,16 +209,20 @@ const MozElementMixin = Base => class Mo
     // Actually set the attribute.
     if (attrNewName === "text") {
       child.textContent = hasAttr ? attrValue : "";
     } else if (hasAttr) {
       child.setAttribute(attrNewName, attrValue);
     } else {
       child.removeAttribute(attrNewName);
     }
+
+    if (attrNewName == "accesskey" && child.formatAccessKey) {
+      child.formatAccessKey(false);
+    }
   }
 
   /**
    * Sometimes an element may not want to run connectedCallback logic during
    * parse. This could be because we don't want to initialize the element before
    * the element's contents have been fully parsed, or for performance reasons.
    * If you'd like to opt-in to this, then add this to the beginning of your
    * `connectedCallback` and `disconnectedCallback`: