Skip to content

Fragment links are rendered different from regular links (missing underline) #716

@Josh-Cena

Description

@Josh-Cena

There are two things that make our anchor link handling non-ideal:

  • They don't get the underline. This is anti-a11y: we used to not have the underline at all, and they were added because people with color blindness cannot perceive the color difference and need another visual cue. This argument obviously applies to anchor links as well, which are still links. Removing underlines means that these anchor links appear just like normal content to them.
  • Manual anchor links in DTs, like - [xxx](#yyy), don't get link styling. While I get the rationale for not styling autogenerated links, I believe that if a writer writes such a link manually, they would expect it to be indicated as a link. This could probably be fixed by injecting a class name in Rari when autogenerating anchor links to the DT itself, and then targeting that class name instead of targeting a[href^="#"].

For example, on this page: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension

image

Each DT is actually an explicit anchor link and it should take you somewhere else. (For some mysterious reason this doesn't seem to be all true, so perhaps there's always a Rari bug here.) But there's no styling to indicate this.

Furthermore consider any anchor link:

image

If I remove the colors, then the fact that the second link is clickable is very inobvious. These two links are both links and there shouldn't be a distinction!

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs content decisionThis issue needs a decision from the MDN Content Team before it can proceed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions