Skip to content

Commit

Permalink
ADA-1572 - Replace a tag with span when link is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinStoicaK committed Aug 14, 2024
1 parent 75ff865 commit 7f58d7b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/logo/logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class Logo extends Component<any, any> {
<div
className={[style.controlButtonContainer, !props.config.url || !this.state.isUrlClickable ? style.emptyUrl : ''].join(' ')}
title={props.config.text}>
{this.state.isUrlClickable ? (
<a
onClick={this._handleOnClick}
className={style.controlButton}
Expand All @@ -133,9 +134,19 @@ class Logo extends Component<any, any> {
>
<img className={style.icon} src={props.config.img} />
</a>
) : (
<span
className={style.controlButton}
aria-label={props.config.text || props.logoText}
tabIndex={0}
>
<img className={style.icon} src={props.config.img} />
</span>
)}
</div>
);
}

}

Logo.displayName = COMPONENT_NAME;
Expand Down

0 comments on commit 7f58d7b

Please sign in to comment.