我知道使用占位符文本作为标签不太容易理解,但它在技术上违反 WCAG 2 吗?我找不到任何明确的内容,但我想知道以更专业的方式阅读该标准是否会发现其中的内容。
这是我的代码:
console.log($('p').html())
<p><span data-htmlContent="<p>This is not really in a p tag.</p>">.</span>.</p>
在Chrome和较旧的FireFox中,控制台记录: <span data-htmlcontent="<p>This is not really in a p tag.</p>">.</span>.
但在IE和更新的FireFox中它会记录: <span data-htmlcontent="<p>This is not really in a p tag.</p>">.</span>.
问题可以在这里看到:http://jsfiddle.net/Nzj52/9/
javascript internet-explorer dom cross-browser html-escape-characters