Skip to content

Search Feitio

↵ opens the first↑↓ chooseEsc closes

Link

A link takes you somewhere else: another page, another part of the same page, another site.

On this page

Playground

Opens in
Background
HTML
<a class="feitio-link" href="#playground">the November report</a>

When to use

When not to use

Examples

Same tab

The default: the link takes you there, and the back button brings you back.

Show code
HTML
<a class="feitio-link" href="/agendamentos">os agendamentos desta semana</a>
Read the time guide (abre em nova aba) without losing what you filled in.

New tab

The exception, only when leaving the page would make the person lose something, like a half-filled form. Always with the icon and the hidden notice.

Show code
HTML
<a class="feitio-link" href="/ajuda/horarios" target="_blank" rel="noopener">
  o guia de horários<svg class="feitio-icon" aria-hidden="true"><use href="feitio/icons/sprite.svg#feitio-new-tab"/></svg>
  <span class="feitio-visually-hidden"> (abre em nova aba)</span>
</a>

The icon means new tab

In Feitio, an icon on a link means one thing only: it opens another tab. A link to another site that opens in the same tab gets no icon.

States

Do and don’t

Do

The link text says where it goes, even read out of context.

Don’t

To see the report, click here.

"Click here" says nothing to someone going through the screen reader’s list of links.

Do

Another site, in the same tab: no icon.

Don’t

The icon promises a new tab that never opens: people learn not to trust it.

Writing

Accessibility

Attributes

AttributeValuesWhat for
class="feitio-link"requiredText orange, always underlined.
hrefURLThe destination.
target="_blank"only as the exceptionOpens a new tab; always with the icon, the hidden text and the rel.
rel="noopener"with target="_blank"The new tab’s safety.
Top