Closed Bug 1784118 Opened 2 years ago Closed 2 years ago

Activate scripts when clicking an extension item in the unified extensions panel

Categories

(WebExtensions :: General, enhancement, P2)

enhancement

Tracking

(firefox105 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: willdurand, Assigned: willdurand)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

Since Bug 1774641, clicking an action button runs the content scripts for MV3 extensions with ungranted host permission. We should do the same in the unified extensions panel, until we have better support for browser actions in this panel.

Attachment #9289313 - Attachment description: WIP: Bug 1784118 - Activate scripts when clicking an extension item in the unified extensions panel. r?rpl!,Jamie → Bug 1784118 - Activate scripts when clicking an extension item in the unified extensions panel. r?rpl!,Jamie

I reused this patch that I had for Bug 1777484. We are going to solve Bug 1777484 in a different way (later) but the patch had most of what we need for this bug too, including some changes to improve keyboard navigation/accessibility.

Blocks: 1785204
Pushed by wdurand@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/81a3bd553ee7
Activate scripts when clicking an extension item in the unified extensions panel. r=Jamie,rpl
Regressions: 1785827
Regressions: 1785829

FTR we made two changes to PanelMultiView for this bug:

  1. Elements with the complex-subviewbutton CSS class are now handled by the TreeWalker for keyboard navigation. This is needed because the rows in the extensions panel (corresponding to an extension) must be clickable (e.g. to activate scripts in this case) but these rows aren't actual buttons because we couldn't easily style buttons (e.g. display: flex does not work). We used the CSS class (introduced for the unified extensions panel in a different patch) in the TreeWalker code because we couldn't use the role attribute and we didn't have any other attribute available.

  2. Elements that should only be navigable with Tab (defined in _isNavigableWithTabOnly()) can now be identified with a data attribute (set to "true"): data-navigable-with-tab-only="true". This is useful to make a secondary button only reachable with tab, while having arrow keys used for faster navigation between main buttons. For the unified extensions panel, users who use keyboard navigation can go from an extension (row) to another by using arrow keys and use Tab to access the secondary (menu) button of the current extension focused in the panel.

I think (1) is going to be removed in Bug 1785204.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: