Skip to content

Commit

Permalink
feat(back-to-top): improve accessibility of back-to-top
Browse files Browse the repository at this point in the history
- Remove `role=button`, since back-to-top is a navigating element
- Add `href=#top` so it is percieved as a link and becomes tabbable
- Add aria-label

[Finishes #100047042]

Signed-off-by: Geoff Pleiss <gpleiss@pivotal.io>
  • Loading branch information
August Toman-Yih authored and Geoff Pleiss committed Jul 28, 2015
1 parent 74c1f4a commit 61c9b93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pivotal-ui-react/back-to-top/back-to-top.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var BackToTop = React.createClass({
style: {display: 'inline', opacity: this.animate('opacity', visible ? 1 : 0, BackToTop.FADE_DURATION)}
}
);
return <a {...props} role='button' onClick={this.scrollToTop}/>;
return <a {...props} onClick={this.scrollToTop} href="#top" aria-label="Back to top" />;
}
});

Expand Down

0 comments on commit 61c9b93

Please sign in to comment.