Skip to content

Commit

Permalink
fix(Accessibility): Fix "Skip To Content" Link
Browse files Browse the repository at this point in the history
Changes the behavior of the skip to content link so it doesn't append multiple anchors to the URL on subsequent selection events.

Closes #193
  • Loading branch information
burnumd committed Apr 12, 2019
1 parent 9466bec commit 9c7f327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const HeaderComponent: React.SFC<HeaderProps & React.HTMLAttributes<HTMLDivEleme
const navigation = findFirstChildOfType(children, Navigation.displayName);
return (
<header {...attrs} className={classNames(componentClass, className)} role="banner">
<a className="rvt-skip-link" href={`${document.URL}#main-content`}>Skip to content</a>
<a className="rvt-skip-link" href={`${document.URL.substring(0, document.URL.indexOf('#'))}#main-content`}>Skip to content</a>
<div className="rvt-header__trident">
<Icon name="trident-header" />
</div>
Expand Down

0 comments on commit 9c7f327

Please sign in to comment.