Is there an existing issue for this?
Description of problem
The Search SkinObject renders a clear-text control using an <a> element without an href attribute:
<a class="dnnSearchBoxClearText" title="<%= ClearQueryText %>"></a>
This element is not a navigational link and is only used as a UI control to clear the search input via JavaScript.
As a result:
- Google Lighthouse and PageSpeed report “Links are not crawlable”
- Google Search Console shows persistent crawlability warnings
- The markup violates HTML semantics and accessibility guidelines (WCAG), since an anchor without a destination is announced as a link with no target
This warning appears consistently on DNN-based sites and cannot be resolved at the site level without modifying the core Search SkinObject.
Description of solution
Replace the anchor element with a semantic button element:
<button
type="button"
class="dnnSearchBoxClearText"
title="Clear search"
aria-label="Clear search">
</button>
Why this works:
- A button is the correct semantic element for this behavior
- Existing JavaScript and CSS continue to work without changes
- SEO crawlability warnings are resolved
- Accessibility is improved (keyboard and screen-reader friendly)
- No breaking changes to behavior or UI
Description of alternatives considered
Adding href="#"
❌ Causes unwanted page jumps and is considered an anti-pattern
Keeping <a> and adding role="button"
❌ Still exposes an anchor without a navigable destination
Replacing with <span>
❌ Lacks native accessibility and keyboard support compared to
The <button> element is the most correct and standards-compliant solution.
Anything else?
This is a long-standing, low-risk issue that affects:
- SEO scores (Lighthouse / PageSpeed)
- Accessibility compliance
- HTML validity
Fixing it in core improves all DNN sites automatically without requiring custom skins or overrides.
Do you plan to contribute code for this enhancement?
Would you be interested in sponsoring this enhancement?
Code of Conduct
Is there an existing issue for this?
Description of problem
The Search SkinObject renders a clear-text control using an
<a>element without anhrefattribute:<a class="dnnSearchBoxClearText" title="<%= ClearQueryText %>"></a>This element is not a navigational link and is only used as a UI control to clear the search input via JavaScript.
As a result:
This warning appears consistently on DNN-based sites and cannot be resolved at the site level without modifying the core Search SkinObject.
Description of solution
Replace the anchor element with a semantic button element:
Why this works:
Description of alternatives considered
Adding
href="#"❌ Causes unwanted page jumps and is considered an anti-pattern
Keeping
<a>and adding role="button"❌ Still exposes an anchor without a navigable destination
Replacing with
<span>❌ Lacks native accessibility and keyboard support compared to
The
<button>element is the most correct and standards-compliant solution.Anything else?
This is a long-standing, low-risk issue that affects:
Fixing it in core improves all DNN sites automatically without requiring custom skins or overrides.
Do you plan to contribute code for this enhancement?
Would you be interested in sponsoring this enhancement?
Code of Conduct