[Enhancement]: Search SkinObject uses anchor without href causing SEO & accessibility issues
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
- Domain
- accessibility, frontend
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
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.
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dnnsoftware/Dnn.Platform
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dnnsoftware/Dnn.Platform#7543 · 1 comment ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dnnsoftware/Dnn.Platform#6681 ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dnnsoftware/Dnn.Platform#6051 · 4 comments ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 3/5 1-2 days Newbie friendliness 45/100
dnnsoftware/Dnn.Platform#7555 ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 4/5 3-5 days Newbie friendliness 22/100
dnnsoftware/Dnn.Platform#7554 · 5 comments ·
Maintainers usually reply within 1 day
All issues in dnnsoftware/Dnn.Platform
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 7 days
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
vchelaru/FlatRedBall2#1481 ·
Maintainers usually reply within 1 day
-
ai-chat bug trivial
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area-signalr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dotnet/aspnetcore#69842 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day