Bug 1473199: Make permission controls tabbable again in the identity popup. r=johannh a=lizzard
authorJames Teh <jteh@mozilla.com>
Wed, 04 Jul 2018 12:24:40 +1000
changeset 477895 ae63660523100f864701a7ee4d299ea5b1d39b84
parent 477894 80347cdf232ed10421728e7a22a1cad6584861c3
child 477896 015e15a8ec84ec0e8741ab817ee27e9f0aad78ce
push id9459
push userarchaeopteryx@coole-files.de
push dateWed, 11 Jul 2018 16:40:16 +0000
treeherdermozilla-beta@ae6366052310 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh, lizzard
bugs1473199
milestone62.0
Bug 1473199: Make permission controls tabbable again in the identity popup. r=johannh a=lizzard Now that the PanelMultiView keyboard navigation code is being used for the identity popup, these need a class of subviewkeynav in order to be tabbable. MozReview-Commit-ID: 47drdy78s4F
browser/base/content/browser-siteIdentity.js
--- a/browser/base/content/browser-siteIdentity.js
+++ b/browser/base/content/browser-siteIdentity.js
@@ -1019,17 +1019,17 @@ var gIdentityHandler = {
     let isPolicyPermission = aPermission.scope == SitePermissions.SCOPE_POLICY;
 
     if (aPermission.id == "popup" && !isPolicyPermission) {
       let menulist = document.createElement("menulist");
       let menupopup = document.createElement("menupopup");
       let block = document.createElement("vbox");
       block.setAttribute("id", "identity-popup-popup-container");
       menulist.setAttribute("sizetopopup", "none");
-      menulist.setAttribute("class", "identity-popup-popup-menulist");
+      menulist.setAttribute("class", "identity-popup-popup-menulist subviewkeynav");
       menulist.setAttribute("id", "identity-popup-popup-menulist");
 
       for (let state of SitePermissions.getAvailableStates(aPermission.id)) {
         let menuitem = document.createElement("menuitem");
         // We need to correctly display the default/unknown state, which has its
         // own integer value (0) but represents one of the other states.
         if (state == SitePermissions.getDefault(aPermission.id)) {
           menuitem.setAttribute("value", "0");
@@ -1082,17 +1082,17 @@ var gIdentityHandler = {
     /* We return the permission item here without a remove button if the permission is a
        SCOPE_POLICY permission. Policy permissions cannot be removed/changed for the duration
        of the browser session. */
     if (isPolicyPermission) {
       return container;
     }
 
     let button = document.createElement("button");
-    button.setAttribute("class", "identity-popup-permission-remove-button");
+    button.setAttribute("class", "identity-popup-permission-remove-button subviewkeynav");
     let tooltiptext = gNavigatorBundle.getString("permissions.remove.tooltip");
     button.setAttribute("tooltiptext", tooltiptext);
     button.addEventListener("command", () => {
       let browser = gBrowser.selectedBrowser;
       this._permissionList.removeChild(container);
       if (aPermission.sharingState &&
           ["camera", "microphone", "screen"].includes(aPermission.id)) {
         let windowId = this._sharingState.windowId;
@@ -1138,17 +1138,17 @@ var gIdentityHandler = {
     indicator.setAttribute("align", "center");
     indicator.setAttribute("id", "blocked-popup-indicator-item");
 
     let icon = document.createElement("image");
     icon.setAttribute("class", "popup-subitem identity-popup-permission-icon");
 
     let text = document.createElement("label");
     text.setAttribute("flex", "1");
-    text.setAttribute("class", "identity-popup-permission-label text-link");
+    text.setAttribute("class", "identity-popup-permission-label text-link subviewkeynav");
 
     let popupCount = gBrowser.selectedBrowser.blockedPopups.length;
     let messageBase = gNavigatorBundle.getString("popupShowBlockedPopupsIndicatorText");
     let message = PluralForm.get(popupCount, messageBase)
                                  .replace("#1", popupCount);
     text.textContent = message;
 
     text.addEventListener("click", () => {