accessibility-developer-tools icon indicating copy to clipboard operation
accessibility-developer-tools copied to clipboard

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

Open alice opened this issue 9 years ago • 2 comments

<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>
  • in this case, the computed text for a.trout is "Learn more about trout fishing". We should reflect that in findTextAlternatives.

alice avatar Jul 29 '15 15:07 alice

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

ricksbrown avatar Aug 03 '15 05:08 ricksbrown

@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.

jdan avatar Sep 04 '15 02:09 jdan