Closed Bug 1832855 Opened 11 months ago Closed 11 months ago

Fix up hover styles for text links throughout onboarding & spotlights

Categories

(Firefox :: Messaging System, defect, P1)

defect

Tracking

()

VERIFIED FIXED
115 Branch
Iteration:
115.1 - May 8 - May 19
Tracking Status
firefox114 --- verified
firefox115 --- verified

People

(Reporter: emcminn, Assigned: nsauermann)

References

(Blocks 1 open bug)

Details

Attachments

(6 files, 1 obsolete file)

Some recent changes to common.css and global-shared.css mean that text-links on about:welcome and in spotlights are no longer inheriting hover styles. Currently, newtab links have:

-underline by default
-no underline on hover
-colour change on active

We should add some rules to aboutwelcome.scss to handle that.

Assignee: nobody → nsauermann
Iteration: --- → 115.1 - May 8 - May 19
Priority: -- → P1

NI @emcminn to attach screenshots of current behavior in Nightly Fx115

Attached image Firefox view spotlight
Attached image Sign in link
Attached video Newtab hover behaviour

We probably want to, at minimum, match the underline behaviour seen on text links on newtab:

Depends on: 1821788
See Also: 18217881828430, 1828433
Severity: -- → S3
Status: NEW → ASSIGNED

Small update - synced up with Gabrielle who will be syncing up with Jules since design systems wanted to apply some changes to these links regardless of this bug.

And somewhat unrelated to this bug, I was curious why the sign in link is a button rather than an anchor tag? Do you happen to have any context into this decision Emily? My understanding was that it's more semantic and accessible to use an a tag when navigating to a new page, but I might be missing some context into this (or may be wrong altogether!)

Flags: needinfo?(emcminn)

(In reply to Negin from comment #6)

Small update - synced up with Gabrielle who will be syncing up with Jules since design systems wanted to apply some changes to these links regardless of this bug.

And somewhat unrelated to this bug, I was curious why the sign in link is a button rather than an anchor tag? Do you happen to have any context into this decision Emily? My understanding was that it's more semantic and accessible to use an a tag when navigating to a new page, but I might be missing some context into this (or may be wrong altogether!)

The CTA's behavior has to be dynamic. In this case the OPEN_URL action opens a new page, but it can be configured to use any action

(In reply to Shane Hughes [:aminomancer] from comment #7)

(In reply to Negin from comment #6)

Small update - synced up with Gabrielle who will be syncing up with Jules since design systems wanted to apply some changes to these links regardless of this bug.

And somewhat unrelated to this bug, I was curious why the sign in link is a button rather than an anchor tag? Do you happen to have any context into this decision Emily? My understanding was that it's more semantic and accessible to use an a tag when navigating to a new page, but I might be missing some context into this (or may be wrong altogether!)

The CTA's behavior has to be dynamic. In this case the OPEN_URL action opens a new page, but it can be configured to use any action

We also use a button element to help manage keyboard interaction for a11y :)

Flags: needinfo?(emcminn)

Ah gotcha, thanks for the context Shane & Emily!

Scope of this ticket is to reintroduce the default link styling for onboarding and spotlight modals (underline by default, on hover underline disappears)

Attachment #9334205 - Attachment description: WIP: Bug 1832855 - Fix up hover styles for text links throughout onboarding & spotlights → Bug 1832855 - Fix up hover styles for text links throughout onboarding & spotlights

[Tracking Requested - why for this release]:
This patch is required to fix the link styles for onboarding and spotlight modals. Currently, the sign in button and secondary links have no hover state/do not seem intractable.

Flags: qe-verify+

To test the fix:

For onboarding:
Visit about:welcome and notice the normal (underline) and hover states (no underline) for sign in link in the top right

For spotlight:
In about:config set browser.newtabpage.activity-stream.asrouter.devtoolsEnabled to true, open a new tab and click the wrench icon. Under messages in ASRouter display the FX_100_UPGRADE message, notice the normal and hover states

To test additional_cta styling:
in about:config set browser.aboutwelcome.screens from the following gist

Pushed by nsauermann@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39f46465214c
Fix up hover styles for text links throughout onboarding & spotlights r=omc-reviewers,emcminn

Comment on attachment 9334205 [details]
Bug 1832855 - Fix up hover styles for text links throughout onboarding & spotlights

Beta/Release Uplift Approval Request

  • User impact if declined: Onboarding and Spotlight links (specifically sign in) do not look interact-able as a result of missing styling and hover states
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Can be found in phabricator test plan or above comment^
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Styling changes only affecting links and their hover states for onboarding and spotlight modals
  • String changes made/needed: No
  • Is Android affected?: No
Attachment #9334205 - Flags: approval-mozilla-beta?

Did we previously have default (underline) -> hover (no underline)?
That sounds OK but doesn't seem like the previous behavior. Actually, I'm pretty sure it was the opposite:
default (no underline) -> hover (underline)
Making links underlined by default would be more consistent with the rest of the browser, but I thought we were just trying to revert the changes from bug 1821788 until a11y review?

Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
QA Whiteboard: [qa-triaged]

I‘ve verified this issue using the latest Firefox Nightly 115.0a1 (Build ID: 20230521210743) on Windows 10 x64, macOS 11.7.1, and Ubuntu 22.04 x64.

  • After following the testing steps from this Test Plan, I confirm the following:
    The “Sign in” link from the first screen of the “about:welcome” page, the “Not now” link from the “FX_100_UPGRADE” spotlight, and the “test additional button” link from the Gratitude screen are underlined as default and are not underlined when hovering them.
Status: RESOLVED → VERIFIED

(In reply to Shane Hughes [:aminomancer] from comment #16)

Did we previously have default (underline) -> hover (no underline)?
That sounds OK but doesn't seem like the previous behavior. Actually, I'm pretty sure it was the opposite:
default (no underline) -> hover (underline)
Making links underlined by default would be more consistent with the rest of the browser, but I thought we were just trying to revert the changes from bug 1821788 until a11y review?

Can we make sure we have the intended behaviour before uplifting to beta? Thanks!

Flags: needinfo?(nsauermann)

Sorry for the ambiguity in my previous post, didn't have time to check it til now. I just tested on release 113.

On about:welcome, I see:

default: no underline
hover: underline
active: no underline
focus-visible: no style (i.e., doesn't underline but doesn't override the hover style)

As far as I can tell, the links on about:newtab are true links. I don't see any text-link styles on about:newtab. It never imported common-shared.css or global-shared.css (the files changed in the regression), so I think it's just not within the scope of this bug. But just for perspective, their styles were inconsistent with about:welcome in 113. On the actual newtab page proper (not the devtools), I see

default: no underline
hover: underline
active: underline
focus-visible: underline

The about:welcome style above seems to be consistent with common-shared.css prior to bug 1821788. These were the styles in common-shared.css:

.text-link {
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link:hover:active {
  text-decoration: none;
}

Per bug 1821788, the text-decoration rules were removed, and a text-decoration rule was added to global-shared.css that underlines all text-links (also all anchor elements, but keep in mind anchor elements are underlined by UA stylesheets already, so this would only be relevant if a less specific author sheet overrode the UA styles, which is unlikely)

.text-link {
  text-decoration: underline;
}

But because we never imported global-shared.css, but we did import common-shared.css, we didn't get the new rule above, but we did lose the text-decoration rules above that. Also, we never distinguished the secondary top link CTA's states by color, since it's always black/white. So instead of looking like about:preferences (where all links are currently underlined in every state, with only the color distinguishing them), it turned out to be non-underlined and the same color in every state.

So if we want to revert bug 1821788, we'd need styles mirroring the common-shared.css styles above. It seems like we might have the opposite now. If we want to go our own way with these styles that's fine too - idk if this is necessarily a critical issue, but we should just make sure whatever we're doing, it's documented and intentional.

Blocks: 1834368

We filed a bug to make a more deliberate decision about hover styles. In the meantime, this is good to go for 114 uplift.

Flags: needinfo?(nsauermann)

The patch does not graft cleanly to the beta branch, yet the uplift request does not mention other uplift needed. I see that browser/components/newtab/content-src/aboutwelcome/aboutwelcome.scss got multiple updates in the 105 nightly cycle, are there other bugs that would need to be uplifted? Please provide a rebased patch for beta, thanks!

Flags: needinfo?(nsauermann)

Hi Pascal, sorry for the delay! I created a new patch with the resolved beta conflicts and assigned you as a reviewer with the same bug id but beta in the description. Let me know if this is okay and if there's any issues with the patch.

Flags: needinfo?(nsauermann) → needinfo?(pascalc)

Comment on attachment 9334205 [details]
Bug 1832855 - Fix up hover styles for text links throughout onboarding & spotlights

Approved D178806 for beta 8, thanks.

Flags: needinfo?(pascalc)
Attachment #9334205 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9335444 - Attachment is obsolete: true
Status: REOPENED → RESOLVED
Closed: 11 months ago11 months ago
Resolution: --- → FIXED

Sorry about this! I didn't catch that beta is still using sasslint rather than stylelint (hence why it passes on Nightly but not Beta because the rule does not exist in stylelint), I'll update the patch so it conforms to the sasslint ruleset.

Attachment #9335451 - Attachment description: Bug 1832855 - Fix up hover styles for text links throughout onboarding & spotlights beta r?pascalc → Bug 1832855 - Fix up hover styles for text links throughout onboarding & spotlights beta r=pascalc a=pascalc

Hi Pascal, apologies for the delay. The beta patch should be ready to land in beta now and is correctly passing sasslint. Let me know if there's any problems or anything needed on my end.

Flags: needinfo?(pascalc)
Flags: needinfo?(pascalc)

I have verified this issue using the latest Firefox Release 114.0.1 (Build ID: 20230608214645) on Windows 10 x64, macOS 13.2, and Linux Mint 20.2 by following the steps provided in this Test plan, and I can confirm the following:

  • The “Sign In” hyperlink from the first screen of the “about:welcome” page, the “Not now” link from the “FX_100_UPGRADE” spotlight in the "asrouter" page, and the “test additional button” link from the "Gratitude" screen are displayed as underlined by default and are not underlined when hovering them.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: