vaadin / vaadin/framework

Setting "rel" attribute on Link component

Open
#7,690 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement workaround
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Originally by dngvh


The Link component should provide a way to set the rel attribute. We are trying to following the advice of this following article to plug vulnerability of target=_blank on links: https://medium.com/@jitbit/target-blank-the-most-underestimated-vulnerability-ever-96e328301f4c#.a2la687av which requires setting the rel attribute on the hrefas follows

rel="noopener noreferrer"

However, there is no way to do so. The Link component should allow setting of this property, or it should automatically set it.


Imported from https://dev.vaadin.com/ issue #19905

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Link component and reviewing how its existing link attributes are exposed. Confirm whether callers should provide rel or whether it should be automatic, then verify that rendered links contain the intended rel value. The issue does not name a file or test, and its discussion has had no recent activity.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.