diff --git a/src/LumexUI/Components/Link/LumexLink.razor.cs b/src/LumexUI/Components/Link/LumexLink.razor.cs index ce5e2e96..46b0195d 100644 --- a/src/LumexUI/Components/Link/LumexLink.razor.cs +++ b/src/LumexUI/Components/Link/LumexLink.razor.cs @@ -69,12 +69,21 @@ private IReadOnlyDictionary Attributes { get { - var attributes = new Dictionary() + var attributes = new Dictionary(); + + // Only add href if not disabled + if( !Disabled ) + { + attributes["href"] = Href; + } + else { - ["href"] = Href - }; + // For disabled links, add accessibility attributes + attributes["tabindex"] = "-1"; + attributes["aria-disabled"] = "true"; + } - if( External ) + if( External && !Disabled ) { attributes["target"] = "_blank"; attributes["rel"] = "noopener noreferrer";