Links inside heading text color is hardcoded

Created on 12 April 2024, 6 months ago
Updated 18 September 2024, 10 days ago

Problem/Motivation

A link in heading text has no visual indication that it exists.

Currently in css/base/typography.css there is the following css

h1 a,h2 a,h3 a,h4 a,h5 a,h6 a,.navbar-brand a,th a,.nav-tabs>li>a a{color:#333333}

This seems to come from:

https://git.drupalcode.org/project/dxpr_theme/-/blame/5.x/scss/base/typo...
and in 6.x it's similar
https://git.drupalcode.org/project/dxpr_theme/-/blob/6.x/scss/base/typog...

Would it not make more sense here perhaps not for navbar related links but for general heading links to have a contrasting color display before the on hover? Otherwise there is no visual indication that the link is a link.

Steps to reproduce

In a node create a heading (using hn) which has a link contained in it. This then does not show visually.

Proposed resolution

Happy to be told that headings shouldn't contain links. Which is the solution I will be pursuing in this case! But figured worth flagging here just in case.

๐Ÿ› Bug report
Status

RTBC

Version

6.0

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand luke.stewart

Live updates comments and jobs are added and updated live.
  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @luke.stewart
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia punit pradhan

    punit pradhan โ†’ made their first commit to this issueโ€™s fork.

  • Assigned to punit pradhan
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia punit pradhan

    can you explain more about this issue in detail @luke.stewart

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia punit pradhan

    punit pradhan โ†’ changed the visibility of the branch 3440376-links-inside-heading to hidden.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand luke.stewart

    Sorry rereading above I missed a step!

    Hopefully the change to this problem/motivation now makes this clear.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia punit pradhan

    can you attach some pictures and if possible a video to reproduce the issue. @luke.stewart

  • First commit to issue fork.
  • Issue was unassigned.
  • Status changed to Needs review 2 months ago
  • Hello,
    I found the issue exists in the current version, so I have raised the MR!3 for the same and updated the version.
    I would be glad to hear from the maintainer if we need to create a separate field for color selection, so that heading containing links can be more customizable. For now I have implemented the color scheme similar to that of the other links (e.g. read more, add comments) present when a article/basic page is created.
    I have added the ss for both without hover and with hover, before and after changes.
    Please have a look.
    Thanks

  • Status changed to RTBC 10 days ago
  • Hi @esha_kundu,
    The patch that you've provided is resolving the issue, the MR also looks good to me. The approach that you've taken seems reasonable, but I'll also defer to the maintainer if he wants to have a separate field for that. But according to the current architecture it works for me, as we're now getting similar sort of hover colour on all kind of links. Hence moving the issue forward to RTBC++
    Attaching before and after screenshots for quick reference.

    On a side note: The forked repo and the upstream seems to be out of sync, hence patch application will fail on composer installed version of the same. We need to sync them, in order to make the patch application successful on the project.

Production build 0.71.5 2024