A <router-link> inside <b-nav-item> renders nested anchor tags #6216
emfluenceindia
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
It would be helpful if you posted the actual code you're using than the rendered HTML. What's the reason you're placing a
You can read more about which components supports creating router links here: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When a
<router-link>
is placed inside a<b-nav-item>
, it renders a nested anchor like this:According to HTML 5 standards nesting of hyperlinks is not allowed.
Since bootstrap-vue targets Vue, there is every possibility that a could be used inside in order to maintain the structure of the DOM.
I think if we can pass a prop with
<b-nav-item>
, say<b-nav-item vroute>
, then we can decide what to render. This prop would be optional.If
vroute
, then render like this:which is now valid as no nested anchor is there anymore.
Otherwise, render in usual way, i.e.
It may not be super important at this stage and won't cause any real harm to an application, but it would surely be W3C and HTML5 standard compliance. Maybe giving it a thought is not a bad idea!
Beta Was this translation helpful? Give feedback.
All reactions