GoogleChrome / accessibility-developer-tools

This is a library of accessibility-related testing and utility code.
Apache License 2.0
2.28k stars 363 forks source link

`findTextAlternatives` should take ::before and ::after content into account. #214

Open alice opened 9 years ago

alice commented 9 years ago
<html>
<head>
  <meta charset="utf-8">
  <title>Trout fishing</title>
  <style>a.trout::after{content: "Learn more about trout fishing"}</style>
</head>
<body>
  <a class="trout" href="https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=trout%20fishing"></a>
</body>
</html>
ricksbrown commented 9 years ago

Do you think it should take placeholder into account too? https://github.com/GoogleChrome/accessibility-developer-tools-extension/issues/25

jdan commented 9 years ago

@ricksbrown AFAIK placeholder isn't good enough, and maybe we need to change https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules?

From http://www.w3.org/TR/html5/forms.html#the-placeholder-attribute:

The placeholder attribute should not be used as a replacement for a label.