Open up new placement options for icon

Created on 19 September 2022, almost 2 years ago
Updated 3 February 2023, over 1 year ago

Problem/Motivation

Right now the icon can only be prepended or appended to the link, meaning any CSS (example - underline) cannot be applied to the text only, and the link graphic also has the CSS applied.

Steps to reproduce

Use the module, set links to be underlined in the CSS in the theme, view an external link, and see that the icon is also underlined.

Proposed resolution

Allow four options:
* Before
* Prepend
* Append
* After

User interface changes

The checkbox that placed the icon before or after, is now a select element allowing multiple options.

API changes

None, existing API already manages this. Just need to change the form element.

Data model changes

None.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada Jaypan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands bskibinski Breda, The Netherlands

    Because of a recent accessibility audit, I see this new functionality for extlink.

    I would advise rolling this change back, but that could be difficult now without breaking existing sites.

    The problem of rendering the icon/text outside of the link, is that screen readers (accessibility) won't read this text, because it's placed outside of the link, and isn't referenced by any aria-describedby labels.

    IMHO I think a better solution would be to just override the underline on the icon with CSS, instead of this solution.

    We do want to make an improvement, that decouples the icon from the 'screen-reader' text, and than this option would be viable again. But for now, I would not recommend using the new before/after placements.

Production build 0.69.0 2024