This disables ctrl+clicking links (which is why I looked, and am now opening this issue)
This is brittle as it may render the link non-functional if site JavaScript glitches, either by not loading completely or failing partially because of e.g. poorly implemented analytics which gets erased by ad blockers
This is probably screen reader/accessibility hostile in general, as there's no ARIA labels nor anything which would implicate the element's role
it doesn't always differentiate between left and right clicks; this is not consistent though
My recommendation for the fix is a bit more involved, but should make sense:
Implement a <Link> component, which renders as <a ...> with some treats;
allow composing the link's CSS styles to make it look like normal text link, or maybe colored from a palette, or button-like etc.
automatically set the "boring" link metadata when the link points to an outside website, including
Hey,
Seems that for simple items at least the top navbar items are not proper links (
<a href="...">
), but instead manually built<span>
s: https://github.com/fintraffic-design/fds-coreui-components/blob/f14c3a7ead5f148fe28d3b0697a9e66c22696e41/src/navigation.ts#L125-L128This approach has several issues:
My recommendation for the fix is a bit more involved, but should make sense:
<Link>
component, which renders as<a ...>
with some treats;rel="nofollow noreferrer noopener"
(see why),target="_blank"
and whatever elseonClick
callback for those richer links which actually need to do more than navigation<Link>
. This has several benefits:<button>
abuse in general through better styling, form elements are not hyperlinks and should not be used as such