Skip to content

Commit

Permalink
Take a elements without href as button
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet committed Apr 26, 2023
1 parent 7a62ca9 commit a574af3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/LinkDotNet.Blog.Web/Features/Home/Components/Anchor.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@if (string.IsNullOrEmpty(Href))
{
<a class="@CssClass">@ChildContent</a>
<a class="@CssClass" role="button">@ChildContent</a>
}
else
{
Expand All @@ -9,10 +9,10 @@ else
@code {
[Parameter]
public string CssClass { get; set; }

[Parameter]
public string Href { get; set; }

[Parameter]
public RenderFragment ChildContent { get; set; }
public RenderFragment ChildContent { get; set; }
}
2 changes: 1 addition & 1 deletion src/LinkDotNet.Blog.Web/Pages/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
An unhandled exception has occurred. See browser dev tools for details.
</environment>
<a href="/" class="reload">Reload</a>
<a class="dismiss">x</a>
<a class="dismiss" role="button">x</a>
</div>
<script src="_framework/blazor.server.js"></script>
<script async src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js" integrity="sha512-bgHRAiTjGrzHzLyKOnpFvaEpGzJet3z4tZnXGjpsCcqOnAH6VGUx9frc5bcIhKTVLEiCO6vEhNAgx5jtLUYrfA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
Expand Down

0 comments on commit a574af3

Please sign in to comment.