Bug 1473199: Make permission controls tabbable again in the identity popup. r=johannh
authorJames Teh <jteh@mozilla.com>
Wed, 04 Jul 2018 12:24:40 +1000
changeset 425275 4caf4cf4cf374868e722b7e02d8c8c9cc759c8ad
parent 425274 18a6d392999fb556fd429ce542f49fd5ffd3655f
child 425276 13c926e6695891fe6a2a7145468e38b7eb08bc70
push id66003
push userjteh@mozilla.com
push dateThu, 05 Jul 2018 23:12:57 +0000
treeherderautoland@4caf4cf4cf37 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1473199
milestone63.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 1473199: Make permission controls tabbable again in the identity popup. r=johannh 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
@@ -1025,17 +1025,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");
@@ -1088,17 +1088,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;
@@ -1144,17 +1144,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", () => {