Skip to content

Improve accessibility of link rendering #73

Description

@cokernel

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 external link icon.

This feature probably depends on #72.

Implementing this feature would be useful for #39.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions