Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Components/Web/src/Routing/NavLink.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Components/Web/src/Routing/NavLink.cs b/src/Components/Web/src/Routing/NavLink.cs
index 3e2d96c81e..8ab139754b 100644
--- a/src/Components/Web/src/Routing/NavLink.cs
+++ b/src/Components/Web/src/Routing/NavLink.cs
@@ -163,7 +163,11 @@ public class NavLink : ComponentBase, IDisposable
builder.AddMultipleAttributes(1, AdditionalAttributes);
builder.AddAttribute(2, "class", CssClass);
- builder.AddContent(3, ChildContent);
+ if (_isActive)
+ {
+ builder.AddAttribute(3, "aria-current", "page");
+ }
+ builder.AddContent(4, ChildContent);
builder.CloseElement();
}