Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Enhancement]: Search SkinObject uses anchor without href causing SEO & accessibility issues

Open
#6,959 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #6960 by @uzmannazari — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
html

Research direction

Start by locating the Search SkinObject and reading where it renders the clear-text control. Check the existing JavaScript and CSS behavior for that control before changing its markup. Done means the control uses a button and still clears the search input; no test or file is named in the issue.

Written by the indexing model from the issue text.

Description

Status: New
Is there an existing issue for this?
  • I have searched the existing issues
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.

Image
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?
  • Yes
Would you be interested in sponsoring this enhancement?
  • Yes
Code of Conduct
  • I agree to follow this project's Code of Conduct

Dominant language
C#
Stars
1.1k
Forks
791
Avg merge
2d 2h
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dnnsoftware/Dnn.Platform

All issues in dnnsoftware/Dnn.Platform

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.