Skip to content

Commit

Permalink
add discernible name to anchor links to appease lighthouse
Browse files Browse the repository at this point in the history
note, undesirably, "anchor-" gets added to the slugified ID
from `IdAttributePlugin`.
  • Loading branch information
rdela committed Jul 23, 2024
1 parent 02c3b31 commit 4ddb6ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _components/html/h2.webc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
`${slots.text.default}`
</script>
<h2 @attributes webc:root="override">
<a href="#" class="heading-link"><span aria-hidden="true">#</span></a>
<a href="#" class="heading-link"><span aria-hidden="true">#</span><visually-hidden>anchor</visually-hidden></a>
<slot></slot>
</h2>
2 changes: 1 addition & 1 deletion _components/html/h3.webc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<link rel="stylesheet" href="heading.css">
<h3 @attributes webc:root="override">
<a href="#" class="heading-link"><span aria-hidden="true">#</span></a>
<a href="#" class="heading-link"><span aria-hidden="true">#</span><visually-hidden>anchor</visually-hidden></a>
<slot></slot>
</h3>
2 changes: 1 addition & 1 deletion _components/html/h4.webc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<link rel="stylesheet" href="heading.css">
<h4 @attributes webc:root="override">
<a href="#" class="heading-link"><span aria-hidden="true">#</span></a>
<a href="#" class="heading-link"><span aria-hidden="true">#</span><visually-hidden>anchor</visually-hidden></a>
<slot></slot>
</h4>

0 comments on commit 4ddb6ad

Please sign in to comment.