github / github/erblint-github

Idea: Introduce new rule against use of `target="_blank"` on links

未關閉
#26 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
good first issue needs-discussion
主要語言
Ruby
星號
66
分支
9
平均合併
9 小時 26 分鐘
30 天內合併 PR
2

描述

`target="_blank"` is frequently used on external links. However, this can be disorienting for many groups of users who don't expect to be in a new window. Using `target="_blank"` requires extra considerations which can be tricky to enforce, so it may be best to avoid them altogether.

From @jscholes in [Slack thread](https://github.slack.com/archives/C0FSWLQ0Y/p1647548349260269):

> TL;DR: don't force links to open in a new tab/window. When you force it, users can not opt out in any browser I know of. However, when you give them the choice from the start, users can make their own decision as to: current window, new tab, or new entire window.
> If links are forced to open in a new tab/window, you have to surface that fact upfront, with "(opens in new tab)" and icons everywhere. Personally, while I see the utility of this, it makes many websites cluttered and a nightmare to read, particularly when you have new-opener links in the middle of text paragraphs. And, can all be avoided by just not doing it in the first place.

#### Resources

- [Link Targets and 3.2.5](https://adrianroselli.com/2020/02/link-targets-and-3-2-5.html)
- [G201: Giving users advanced warning when opening a new window](https://www.w3.org/TR/WCAG20-TECHS/G201.html)
- [Links and new windows](https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/links/links-and-new-windows/)

貢獻指南

開啟貢獻指南

研究方向

No implementation files, tests, or entry points are named. Start with the linked accessibility guidance to clarify the intended scope; done means the project has a rule that consistently flags target="_blank" links.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
html, ruby
領域
accessibility, tooling
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。