Skip to content

Commit

Permalink
feat(link): add 'aria-disabled'
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMenga committed May 6, 2024
1 parent 3bbe3db commit 3bb30db
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ snapshots["sbb-button-link renders a disabled sbb-button-link with slotted icon

snapshots["sbb-button-link renders a disabled sbb-button-link with slotted icon ShadowDom"] =
`<a
aria-disabled="true"
class="sbb-action-base sbb-button-link"
href="https://www.sbb.ch"
tabindex="-1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ snapshots["sbb-secondary-button-link renders a disabled sbb-secondary-button-lin

snapshots["sbb-secondary-button-link renders a disabled sbb-secondary-button-link with slotted icon ShadowDom"] =
`<a
aria-disabled="true"
class="sbb-action-base sbb-secondary-button-link"
href="https://www.sbb.ch"
tabindex="-1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ snapshots["sbb-tertiary-button-link renders a disabled sbb-tertiary-button-link

snapshots["sbb-tertiary-button-link renders a disabled sbb-tertiary-button-link with slotted icon ShadowDom"] =
`<a
aria-disabled="true"
class="sbb-action-base sbb-tertiary-button-link"
href="https://www.sbb.ch"
tabindex="-1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ snapshots["sbb-transparent-button-link renders a disabled sbb-transparent-button

snapshots["sbb-transparent-button-link renders a disabled sbb-transparent-button-link with slotted icon ShadowDom"] =
`<a
aria-disabled="true"
class="sbb-action-base sbb-transparent-button-link"
href="https://www.sbb.ch"
tabindex="-1"
Expand Down
1 change: 1 addition & 0 deletions src/components/core/base-elements/link-base-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export abstract class SbbLinkBaseElement extends SbbActionBaseElement {
rel=${this._evaluateRelAttribute()}
aria-label=${this.accessibilityLabel || nothing}
tabindex=${this.maybeDisabled ? '-1' : nothing}
aria-disabled=${this.maybeDisabled ? 'true' : nothing}
>
${this.renderTemplate()}
${!!this.href && this.target === '_blank'
Expand Down

0 comments on commit 3bb30db

Please sign in to comment.