Thanks, @morat.
The shortcuts in the article linked above do kinda work, sorta...
In place of "F6, Shift+Tab..." I used the code you provided earlier:
and assigned it to Control-Spacebar for testing. This, then, moves the focus to the currently active tab in the tab bar. Now, left-arrow/right-arrow/home/end (per the article), as I noted previously, do move the focus to the adjacent/first/last tab, but also cause that newly focused tab to become the current tab (and thus displayed in the content window).
Control -left/-right/-home/-end keys (as per the article) also cause the focus to move to a different tab, without causing that new tab to become current; this was the desired behavior. In the case of ctrl-home/-end, the focus is correctly moved to the first/last tab.
However, in the case of ctrl-left/-right, the focus is moved to a different tab which appears to be completely random. It is not necessarily the previous/next tab (though it could be); and it is not necessarily a tab previous-to or following-after the current tab, as it could move in either direction. And a ctrl-left followed by a ctrl-right does not move the focus back to the original tab. In short, it really does appear random, though I'm sure it is not actually random, it is just following some algorithm in the code which is anything but obvious. [I should note that I use a multi-line tab bar (though that shouldn't matter), and am using the Simple Tab Groups add-on, so I have multiple tab groups.] But the strange order of tab selection does appear to be constrained to the tabs which appear within the current group.
Also, though the article section is titled "Selection of Multiple Tabs", I could find no way to actually select multiple tabs.
Try this:
Code: Select all
// select first tab and focus, aria focus second tab
gBrowser.selectedTab = gBrowser.tabs[0];
gBrowser.selectedTab.focus();
gBrowser.tabContainer.ariaFocusedItem = gBrowser.tabs[1];
setTimeout(function () {
alert(gBrowser.tabContainer.selectedIndex); // 0
alert(gBrowser.tabContainer.ariaFocusedIndex); // 1
}, 1000);
I'm not sure what the intended purpose of this code is, but I ran it in the console, and it caused the tab bar to change to a different tab-group, with the first and second tab of that group selected, and additionally some other anomalies which I'm at a loss to describe.
However, the fact that we are now able by keyboard to move tab focus without tab selection, serves as a proof-of-concept. I'm confident that the correct algorithms could be determined to move focus, select, etc. in the desired manner. All that remains is to find someone willing and able to create such an add-on.
Mr. Qwerky