Non-hyperlink anchors (a elements) have hyperlink styling

Created on 16 July 2023, 12 months ago
Updated 20 May 2024, about 1 month ago

Problem/Motivation

Non-hyperlink anchors (a elements) have hyperlink styling for example- In the body, add something like -

<a name="foo">Foo</a>: Foo
<a href="bar">Bar</a>: Bar

You will see that both have the same hyperlink styling even when an anchor has no href attribute.

Steps to reproduce

  • Create a blank site, with Olivero default theme
  • Create a node with a format allowing the <a> element
  • In the body, add something like <a name="foo">Foo</a>: Foo
  • In the body, add something like <a href="bar">Bar</a>: Bar
  • Observe (cf. screenshot) they both carry Olivero's hyperlink "underline" styling.
  • The only hint is for those who can use one is the cursor styling not switching to the hand shape

This is an accessibility issue: users will believe the a.name is a link and be frustrated to find it is not clickable until they notice the cursor shape.

The same problem exists in Bartik and in the drupal.org theme (see the list just above), but not in Claro.

Proposed resolution

Do not style a.name at all unless it is also a a.href. This is an attribute meant for browsers, not for user consumption.

Remaining tasks

Identify the source of this behaviour, and fix it.

User interface changes

Links which are not hyperlinks will no longer look like hyperlinks.

  • Before:
  • After:

API changes

None.

Data model changes

None.

Release notes snippet

TBD.

๐Ÿ› Bug report
Status

Needs review

Version

11.0 ๐Ÿ”ฅ

Component
Oliveroย  โ†’

Last updated about 7 hours ago

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance fgm Paris, France

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

Production build 0.69.0 2024