Problem/Motivation

There are many links to the fontawesome site in Drupal\fontawesome\Plugin\Field\FieldWidget\FontAwesomeIconWidget.php. Some editors are clicking these links which takes them away from the page they're editing.

Proposed resolution

Update these links to open in a new tab.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sonfd created an issue. See original summary.

sonfd’s picture

Status: Active » Needs review
FileSize
14.85 KB

Here's a patch that updates all UI links in the Field Widget and Field Formatter to open in a new tab.

sonfd’s picture

Title: Links in the field widget open in current tab » Open UI Links in a new tab
Daniel.Moberly’s picture

Status: Needs review » Closed (won't fix)

Auditing other issues of this type it looks like the reverse issue is sometimes filed in other modules, i.e. "Links should not always open in a new tab"

As a result, I think this is subjective on whether this is desired behavior or not and can be addressed in the theme/template layer.

sonfd’s picture

@Daniel.Moberly - Do you have some examples? In this case, these links pull an editor away from a form they're currently editing, potentially causing them to lose their changes - that's why I'd advocate for them opening in a new tab, only to prevent that data loss. I'm curious why others are opposed to this.

anacolautti’s picture

Status: Closed (won't fix) » Active

I agree with @sonfd. In my opinion It's very annoying for end users to be taken away from their forms.

According to w3.org techniques:

[...] There are some situations where it is preferable from an accessibility perspective to open a new window or tab. [...]
(For example when) Opening a page containing context-sensitive information, such as help instructions, or an alternate means of completing a form [...] will significantly disrupt a multi-step workflow, such as filling in and submitting a form, if the page is opened in the same window or tab.

There are techniques to warn the user: https://www.w3.org/TR/WCAG20-TECHS/G201.html, for example adding a warning in the link "(opens in a new tab)".

Should we implement such technique in the patch?

Daniel.Moberly’s picture

I don't think we need a warning. I can see the argument here and would support a new patch to address this.

sonfd’s picture

Status: Active » Needs review
FileSize
14.85 KB

Here's a reroll of the patch from #2 against the latest 2.x-dev

Daniel.Moberly’s picture

Status: Needs review » Reviewed & tested by the community

Looks good - thanks for the patch!

Daniel.Moberly’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.