mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Merge pull request #321 from josefaidt/320-add-rel-all-links
chore(links): add rel="" to all links
This commit is contained in:
commit
e382038850
7 changed files with 8 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
||||||
{#if href}
|
{#if href}
|
||||||
<a
|
<a
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
role="button"
|
role="button"
|
||||||
class:bx--skeleton="{true}"
|
class:bx--skeleton="{true}"
|
||||||
class:bx--btn="{true}"
|
class:bx--btn="{true}"
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
class:bx--link--inline="{inline}"
|
class:bx--link--inline="{inline}"
|
||||||
class:bx--link--visited="{visited}"
|
class:bx--link--visited="{visited}"
|
||||||
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
{href}
|
href="{href}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
class:bx--tile--clickable="{true}"
|
class:bx--tile--clickable="{true}"
|
||||||
class:bx--tile--is-clicked="{clicked}"
|
class:bx--tile--is-clicked="{clicked}"
|
||||||
class:bx--tile--light="{light}"
|
class:bx--tile--light="{light}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
href="{href}"
|
href="{href}"
|
||||||
on:click
|
on:click
|
||||||
|
|
|
@ -41,8 +41,9 @@
|
||||||
class:bx--header__action="{true}"
|
class:bx--header__action="{true}"
|
||||||
class:bx--header__action--active="{linkIsActive}"
|
class:bx--header__action--active="{linkIsActive}"
|
||||||
class:action-link="{true}"
|
class:action-link="{true}"
|
||||||
{...$$restProps}
|
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
|
{...$$restProps}
|
||||||
>
|
>
|
||||||
<Icon {...icon} />
|
<Icon {...icon} />
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
role="menuitem"
|
role="menuitem"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
class:bx--header__menu-item="{true}"
|
class:bx--header__menu-item="{true}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<a
|
<a
|
||||||
bind:this="{ref}"
|
bind:this="{ref}"
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
class:bx--switcher__item-link="{true}"
|
class:bx--switcher__item-link="{true}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
bind:this="{ref}"
|
bind:this="{ref}"
|
||||||
aria-current="{isSelected ? 'page' : undefined}"
|
aria-current="{isSelected ? 'page' : undefined}"
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
class:bx--side-nav__link="{true}"
|
class:bx--side-nav__link="{true}"
|
||||||
class:bx--side-nav__link--current="{isSelected}"
|
class:bx--side-nav__link--current="{isSelected}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue