Closed Bug 1770067 Opened 2 years ago Closed 2 years ago

Fix promo button to support link styling and href attribute

Categories

(Firefox :: Messaging System, defect, P1)

defect

Tracking

()

RESOLVED FIXED
103 Branch
Iteration:
103.2 - June 13 - June 24
Tracking Status
firefox103 --- fixed

People

(Reporter: pdahiya, Assigned: jprickett)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

With fix of https://bugzilla.mozilla.org/show_bug.cgi?id=1761842, promo CTA started using button element instead of anchor tag. This broke the flow that relied on using href attribute to open promoLinkURL used by VPN Promo.

https://searchfox.org/mozilla-central/source/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js#113

Fix of bug https://bugzilla.mozilla.org/show_bug.cgi?id=1770061 will allow opening URL using SpecialMessageActions API. Scope of this bug is to evaluate a) advantage of href navigation, b) if we want to keep styling for promo button as link vs button and accordingly cleanup the code.

https://searchfox.org/mozilla-central/source/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js#109

Marking P2 in favor of no immediate requirement for styling promo button as link

Priority: -- → P2

The severity field is not set for this bug.
:tspurway, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(tspurway)
Severity: -- → S3
Priority: P2 → P3
Flags: needinfo?(tspurway)
Assignee: nobody → jprickett
Status: NEW → ASSIGNED

Using an <a> tag with tabindex="0" here supports both cases of having either an anchor or a button, however it interrupts the accessibility of the button slightly.

Adding a role to the anchor in the case of it acting as a button, and adding a keyup handler to handle space and enter key events in the same way as click events brings this back into the realm of accessible.

Attachment #9281711 - Attachment description: Bug 1770067 - Reverting button element to anchor element to support future promos with link urls r?pdahiya,emcminn → Bug 1770067 - Adding link support to private browsing promo button r?pdahiya,emcminn
Iteration: --- → 103.2 - June 13 - June 24
Priority: P3 → P1
Pushed by jprickett@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/074332a16756
Adding link support to private browsing promo button r=pdahiya,emcminn
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: