【发布时间】:2018-12-18 19:31:54
【问题描述】:
我已阅读与此问题相关的其他一些问题,但它们对我没有帮助。我试过添加aria-labels,但这也无济于事。作为失败的元素,我仍然得到<a href="" target="_blank" rel="noopener noreferrer"></a> 类型的链接。
这里是有问题的 HTML(只是一个在表格中输出一些信息的基本浏览器检查器):
<!doctype html>
<html lang=en>
<head>
<title>test</title>
<meta charset="utf-8">
<meta name="description" content="An internship project. Holla at ya boy!">
<meta name="theme-color" content="#175506">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="img/favicon.ico">
<link rel="stylesheet" type="text/css" href="css/main.css">
<script defer src="js/test.js"></script>
</head>
<body>
<div class="header">
<p>Check if your browser is relatively secure</p>
</div>
<table>
<tr>
<td>OS</td>
<td id="os"></td>
<td>Windows had several problems in the past with browser security. <a href="https://gizmodo.com/google-shames-microsoft-for-not-fixing-windows-10-brows-1792819255" target="_blank" rel="noopener noreferrer" aria-label="Twitter">A Gizmodo article</a> and <a href="https://news.softpedia.com/news/google-discloses-windows-10-browser-vulnerability-that-microsoft-failed-to-patch-519844.shtml" target="_blank" rel="noopener noreferrer" aria-label="Twitter2">a Softpedia article</a> have some things to say about it.</td>
</tr>
<tr>
<td>Browser</td>
<td id="browser"></td>
<td>The best way to make sure your browser is relatively secure is to <a href="https://updatemybrowser.org" target="_blank" rel="noopener noreferrer" aria-label="Twitter3">keep it up to date</a>.</td>
</tr>
<tr>
<td>IP</td>
<td id="ip"></td>
<td>The IP can be an entry point into your system.</td>
</tr>
<tr>
<td>Browser timezone</td>
<td id="timezoneBrowser"></td>
<td rowspan="2">If the browser and IP timezones don't match, one can assume that you are using a VPN.</td>
</tr>
<tr>
<td>IP timezone</td>
<td id="timezoneIP"></td>
</tr>
<tr>
<td>Plugins</td>
<td id="plugins"></td>
<td>The more plugins you have, the bigger the attack area.</td>
</tr>
<tr>
<td>Fonts</td>
<td id="fonts"></td>
<td>The more fonts you have, the chance that your browser has a unique configuration increases, alongside its entropy <a href="https://panopticlick.eff.org/static/browser-uniqueness.pdf" target="_blank" rel="noopener noreferrer" aria-label="Twitter4">(EFF whitepaper)</a>.</td>
</tr>
<tr>
<td>Monitor size</td>
<td id="monitorSize"></td>
<td rowspan="4">Useful for fingerprinting.</td>
</tr>
<tr>
<td>Browser size</td>
<td id="browserSize"></td>
</tr>
<tr>
<td>This screen is a</td>
<td id="touchscreen"></td>
</tr>
<tr>
<td>Adblocking is</td>
<td id="block_me"></td>
</tr>
<tr>
<td>Flash is</td>
<td id="flash"></td>
<td><a href="https://www.cvedetails.com/vulnerability-list/vendor_id-53/product_id-6761/Adobe-Flash-Player.html" target="_blank" rel="noopener noreferrer" aria-label="Twitter5">Flash is bad, mkay?</a></td>
</tr>
<tr>
<td><a href="https://en.wikipedia.org/wiki/Do_Not_Track" target="_blank" rel="noopener noreferrer" aria-label="Twitter6">Do Not Track</a> is</td>
<td id="dnt"></td>
<td>From a security (not privacy) standpoint, as the number of third-party connections increases, so does the chance that one of them is malicious. Also, less connections equals less network usage, making things speedier.</td>
</tr>
<tr>
<td>Referrer</td>
<td id="referrer"></td>
<td>A referrer is the page from which you arrived at the current page. Now what if you arrived here from your bank's website and your bank included sensitive info in the URL? It's not that uncommon. <a href="https://blog.avatao.com/How-I-could-steal-your-photos-from-Google/" target="_blank" rel="noopener noreferrer" aria-label="Twitter7">Even Google has this problem</a> from time to time.</td>
</tr>
</table>
<div class="flex-container">
<p><strong>This is not the only information that your browser gives away!</strong> More ways to check your browser:</p>
<ul>
<li><a href="https://browserleaks.com" target="_blank" rel="noopener noreferrer" aria-label="Twitter8">browserleaks.com</a></li>
<li><a href="https://panopticlick.eff.org" target="_blank" rel="noopener noreferrer" aria-label="Twitter9">panopticlick.eff.org</a></li>
<li><a href="https://dnsleaktest.com" target="_blank" rel="noopener noreferrer" aria-label="Twitter10">dnsleaktest.com</a></li>
<li><a href="https://ipleak.net" target="_blank" rel="noopener noreferrer" aria-label="Twitter11">ipleak.net</a></li>
<li><a href="https://ip-check.info/?lang=en" target="_blank" rel="noopener noreferrer" aria-label="Twitter12">ip-check.info</a></li>
<li><a href="http://browserspy.dk" target="_blank" rel="noopener noreferrer" aria-label="Twitter13">browserspy.dk</a></li>
<li><a href="https://amiunique.org/fp" target="_blank" rel="noopener noreferrer" aria-label="Twitter14">amiunique.org</a></li>
<li><a href="https://tenta.com/test" target="_blank" rel="noopener noreferrer" aria-label="Twitter111">tenta.com</a></li>
</ul>
</div>
</body>
</html>
发生了什么事?这是灯塔问题吗?
【问题讨论】:
-
“名称”到底是什么意思?不仅仅是
name="..."属性? -
我的意思是链接文本。根据 Lighthouse 的说法:“可识别、独特且可聚焦的链接文本(以及图像的替代文本,当用作链接时)改善了屏幕阅读器用户的导航体验。”但是,每个
<a>属性都有可识别的文本。 -
我相信这是因为您的案例中的实际链接文本不是很具体。如果“Gizmodo 文章”更具体地指向链接,例如“Google 因未修复 WIndows 10 而感到羞耻”
-
@Fraze 我在每个链接中添加了太多文字,这太荒谬了。还是……
-
@Fraze 链接文本看起来对我来说足够具体。 @wombat 尝试用真实的站点名称替换类似域名的链接文本,看看问题是否仍然存在;例如Panopticlick 而不是
panopticlick.eff.org。aria-label也有可能覆盖了链接文本,而这些属性值看起来很糟糕。
标签: html accessibility lighthouse