Skip to content

Commit

Permalink
refactor(v2): add title attribute to anchor link (#2066)
Browse files Browse the repository at this point in the history
* fix(v2): add title attribute to anchor link

* Lint

* Wording
  • Loading branch information
lex111 authored and yangshun committed Nov 29, 2019
1 parent d614386 commit dffa984
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/docusaurus-theme-classic/src/theme/Heading/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ const Heading = Tag => ({id, ...props}) => {
return (
<Tag {...props}>
<a aria-hidden="true" tabIndex="-1" className="anchor" id={id} />
<a aria-hidden="true" tabIndex="-1" className="hash-link" href={`#${id}`}>
<a
aria-hidden="true"
tabIndex="-1"
className="hash-link"
href={`#${id}`}
title="Direct link to heading">
#
</a>
{props.children}
Expand Down

0 comments on commit dffa984

Please sign in to comment.