Skip to content

New window/external links no longer working as expected #341

Description

@blackfalcon

What browser client(s) are you seeing the issue on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

On which platforms are you seeing the issue?

  • Desktop
  • Mobile

Steps to reproduce

  1. Go to https://auro.alaskaair.com/components/auro/hyperlink/api
  2. Look for the External Links section
  3. See error
Image

The functionality to show a link to an external site versus opening a new tab with the relative domain is no longer working as expected.

It appears that this regression was introduced between v7.1.0 and v8.0.0
56e0b98

Consider adding the following test to ensure that the proper icons appear

  it("auro-hyperlink new window icons appears", async () => {
    const el = await fixture(html`
      <auro-hyperlink
        target="_blank"
        href="https://www.alaskaair.com">
        external target
      </auro-hyperlink>
    `);

    const titleEl = el.shadowRoot.querySelector('#new-window-stroke__title');
    const text = titleEl?.textContent.trim();

    expect(text).to.equal('Link will open a new tab or window.');
  });

  it("auro-hyperlink external URL icon appears", async () => {
    const el = await fixture(html`
      <auro-hyperlink
        target="_blank"
        href="https://www.portseattle.org/sea-tac">
        external target
      </auro-hyperlink>
    `);

    const titleEl = el.shadowRoot.querySelector('#external-link-stroke__title');
    const text = titleEl?.textContent.trim();

    expect(text).to.equal('Link to external site.');
  });

Expected behavior

Image

Which version of auro-hyperlink do you have installed?

@latest

Reproducible on the Auro doc site

Exit criteria (To be determined by the Auro team)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions