зеркало из https://github.com/mozilla/gecko-dev.git
Bug 881937 - tabindex all the things, r=mconley
This commit is contained in:
Родитель
aecf9fe2b2
Коммит
f9a0645e44
|
@ -51,6 +51,9 @@ var FeedHandler = {
|
|||
item.setAttribute("feed", feedInfo.href);
|
||||
item.setAttribute("tooltiptext", feedInfo.href);
|
||||
item.setAttribute("crop", "center");
|
||||
if (isSubview) {
|
||||
item.setAttribute("tabindex", "0");
|
||||
}
|
||||
container.appendChild(item);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -16,21 +16,21 @@
|
|||
<vbox id="PanelUI-mainView-spring" flex="1"/>
|
||||
|
||||
<footer class="PanelUI-footer">
|
||||
<toolbarbutton id="PanelUI-customize-btn" label="&appMenuCustomize.label;"
|
||||
<toolbarbutton id="PanelUI-customize-btn" label="&appMenuCustomize.label;" tabindex="0"
|
||||
oncommand="gCustomizeMode.toggle()" flex="1"/>
|
||||
<!-- The parentNode is used so that the footer is presented as the anchor
|
||||
instead of just the button being the anchor. -->
|
||||
<toolbarbutton id="PanelUI-help-btn" aria-label="&helpMenu.label;"
|
||||
<toolbarbutton id="PanelUI-help-btn" aria-label="&helpMenu.label;" tabindex="0"
|
||||
oncommand="PanelUI.showHelpView(this.parentNode);"/>
|
||||
</footer>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-history" flex="1">
|
||||
<label value="&appMenuHistory.label;"/>
|
||||
<toolbarbutton id="appMenuClearRecentHistory"
|
||||
<toolbarbutton id="appMenuClearRecentHistory" tabindex="0"
|
||||
label="&appMenuHistory.clearRecent.label;"
|
||||
command="Tools:Sanitize"/>
|
||||
<toolbarbutton id="appMenuRestoreLastSession"
|
||||
<toolbarbutton id="appMenuRestoreLastSession" tabindex="0"
|
||||
label="&appMenuHistory.restoreSession.label;"
|
||||
command="Browser:RestoreLastSession"/>
|
||||
<vbox id="PanelUI-historyItems"/>
|
||||
|
|
|
@ -340,6 +340,9 @@ let CustomizableUIInternal = {
|
|||
}
|
||||
|
||||
this.ensureButtonContextMenu(node, aArea == CustomizableUI.AREA_PANEL);
|
||||
if (node.localName == "toolbarbutton" && aArea == CustomizableUI.AREA_PANEL) {
|
||||
node.setAttribute("tabindex", "0");
|
||||
}
|
||||
|
||||
this.insertWidgetBefore(node, currentNode, container, aArea);
|
||||
this._addParentFlex(node);
|
||||
|
@ -472,6 +475,7 @@ let CustomizableUIInternal = {
|
|||
let document = aPanel.ownerDocument;
|
||||
|
||||
for (let btn of aPanel.querySelectorAll("toolbarbutton")) {
|
||||
btn.setAttribute("tabindex", "0");
|
||||
this.ensureButtonContextMenu(btn, true);
|
||||
}
|
||||
|
||||
|
@ -516,6 +520,9 @@ let CustomizableUIInternal = {
|
|||
let [provider, widgetNode] = this.getWidgetNode(aWidgetId, window);
|
||||
|
||||
this.ensureButtonContextMenu(widgetNode, aArea == CustomizableUI.AREA_PANEL);
|
||||
if (widgetNode.localName == "toolbarbutton" && aArea == CustomizableUI.AREA_PANEL) {
|
||||
widgetNode.setAttribute("tabindex", "0");
|
||||
}
|
||||
|
||||
let nextNode = nextNodeId ? container.querySelector(idToSelector(nextNodeId))
|
||||
: null;
|
||||
|
@ -558,6 +565,7 @@ let CustomizableUIInternal = {
|
|||
container.removeChild(widgetNode);
|
||||
} else {
|
||||
this.removeLocationAttributes(widgetNode);
|
||||
widgetNode.removeAttribute("tabindex");
|
||||
areaNode.toolbox.palette.appendChild(widgetNode);
|
||||
}
|
||||
if (area.type == this.TYPE_TOOLBAR) {
|
||||
|
|
|
@ -105,11 +105,10 @@ const CustomizableWidgets = [{
|
|||
|
||||
let item = doc.createElementNS(kNSXUL, "toolbarbutton");
|
||||
item.setAttribute("label", title || uri);
|
||||
item.addEventListener("click", function(aEvent) {
|
||||
if (aEvent.button == 0) {
|
||||
doc.defaultView.openUILink(uri, aEvent);
|
||||
CustomizableUI.hidePanelForNode(item);
|
||||
}
|
||||
item.setAttribute("tabindex", "0");
|
||||
item.addEventListener("command", function(aEvent) {
|
||||
doc.defaultView.openUILink(uri, aEvent);
|
||||
CustomizableUI.hidePanelForNode(item);
|
||||
});
|
||||
if (icon)
|
||||
item.setAttribute("image", "moz-anno:favicon:" + icon);
|
||||
|
@ -220,6 +219,7 @@ const CustomizableWidgets = [{
|
|||
if (attrVal)
|
||||
item.setAttribute(attr, attrVal);
|
||||
}
|
||||
item.setAttribute("tabindex", "0");
|
||||
fragment.appendChild(item);
|
||||
}
|
||||
items.appendChild(fragment);
|
||||
|
@ -318,6 +318,8 @@ const CustomizableWidgets = [{
|
|||
buttons.forEach(function(aButton) {
|
||||
let btnNode = aDocument.createElementNS(kNSXUL, "toolbarbutton");
|
||||
setAttributes(btnNode, aButton);
|
||||
if (inPanel)
|
||||
btnNode.setAttribute("tabindex", "0");
|
||||
node.appendChild(btnNode);
|
||||
});
|
||||
|
||||
|
@ -456,6 +458,8 @@ const CustomizableWidgets = [{
|
|||
buttons.forEach(function(aButton) {
|
||||
let btnNode = aDocument.createElementNS(kNSXUL, "toolbarbutton");
|
||||
setAttributes(btnNode, aButton);
|
||||
if (inPanel)
|
||||
btnNode.setAttribute("tabindex", "0");
|
||||
node.appendChild(btnNode);
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче