Skip to content
SilktideHelp

Placeholder links

Silktide finds links that point to #, a web address meaning "the top of this page". These are usually placeholders - links added before their destination existed and never updated - or links hijacked to trigger scripts.

<!-- Placeholder left behind: goes nowhere useful -->
<a href="#">Read more</a>

<!-- Link abused to run a script -->
<a href="#" onclick="openMenu()">Menu</a>

Why this matters

A visitor who clicks a # link expects to go somewhere; instead the page just scrolls to the top, which reads as broken. When the pattern is used to trigger , it misleads assistive technology too: a announces it as a link, promising navigation, when it actually behaves as a button - and if scripts fail to load, it does nothing at all.

These links tend to be leftovers: a template shipped with placeholder navigation, or a "coming soon" link nobody revisited.

How to fix it

  1. If the link was meant to go somewhere, point its href at the real destination.
  2. If it triggers a script, replace it with a <button>, which is what expects for actions:
<!-- Before: a link pretending to be a button -->
<a href="#" onclick="openMenu()">Menu</a>

<!-- After: a real button, styled however you like -->
<button onclick="openMenu()">Menu</button>
  1. If the link serves no purpose, remove it or replace it with plain text.
  2. If a # link is genuinely intended - for example, inserted by a framework that enhances it reliably - the finding so it isn't raised again.

How Silktide tests this

  1. Find every conventional link on each page.
  2. Report each one whose href is exactly #.

Links to named positions on the page, such as #news, are legitimate and are not reported.

Troubleshooting

It works for mouse users while scripts load correctly, but it still announces itself as a link to assistive technology and still scrolls to the top when the script fails. A <button> behaves correctly in all of those cases; if changing the markup is impractical, approve the finding.

The # comes from a framework or CMS component

Menu and tab components in some frameworks and themes emit href="#" by default. Check the component's documentation for a way to render a button or a real destination instead.

Learn more

Last updated

Was this page helpful?