As a developer, I would like a generic method I can use to inject an accessible link into a page being generated, so that developers do not need to hardcode links and portions of the link which can be generated automatically are generated automatically.
Currently, links can be rendered with View::renderLink($href, $text, $external = false):
|
public function renderLink($href, $text, $external = false) |
|
{ |
|
return "<a href=\"$href\" " . |
|
($external ? "target=\"_blank\" rel=\"noopener\"" : '') . |
|
">$text</a>"; |
|
} |
If $external is true, then View::renderLink() should clearly communicate that the link is external, and if it forces a popup, it should clearly communicate that too, for example with an icon similar to
.
This feature probably depends on #72.
Implementing this feature would be useful for #39.
As a developer, I would like a generic method I can use to inject an accessible link into a page being generated, so that developers do not need to hardcode links and portions of the link which can be generated automatically are generated automatically.
Currently, links can be rendered with
View::renderLink($href, $text, $external = false):exploreuk-web-app/app/application/libraries/ExploreUK/View.php
Lines 168 to 173 in 7a78d37
If
.
$externalistrue, thenView::renderLink()should clearly communicate that the link is external, and if it forces a popup, it should clearly communicate that too, for example with an icon similar toThis feature probably depends on #72.
Implementing this feature would be useful for #39.