SortSite Text Not Allowed消息

时间:2018-02-03 20:02:47

标签: html w3c

我正在使用SortSite检查我的网站是否可访问。我有一个错误,我只是无法清除,我希望得到更多的眼睛,看看是否有人可以告诉我有什么问题...错误只说文字不允许...任何人有任何想法?谢谢!

<ul>
  <li><span class="obscure" id="Communicating+With+Young+Children_category">Communicating With Young Children</span><a href="p_module_categories.php?id_division=d01&amp;id_category=001&amp;id_module=001&amp;page=1" aria-label="Communicating+With+Young+Children_category">Communicating With Young Children</a></li>
  <li><span class="obscure" id="Considering+Parenthood_category">Considering Parenthood</span><a href="p_module_categories.php?id_division=d01&amp;id_category=002&amp;id_module=001&amp;page=1" aria-label="Considering+Parenthood_category">Considering Parenthood</a></li>
  <li><span class="obscure" id="Children%27s+Self-Esteem_category">Children's Self-Esteem</span><a href="p_module_categories.php?id_division=d01&amp;id_category=003&amp;id_module=001&amp;page=1" aria-label="Children%27s+Self-Esteem_category">Children's Self-Esteem</a></li>
</ul>

1 个答案:

答案 0 :(得分:1)

我刚刚在html5.validator.nu这样的

上针对HTML 5验证程序运行了HTML
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<ul>
  <li><span class="obscure" id="Communicating+With+Young+Children_category">Communicating With Young Children</span><a href="p_module_categories.php?id_division=d01&amp;id_category=001&amp;id_module=001&amp;page=1" aria-label="Communicating+With+Young+Children_category">Communicating With Young Children</a></li>
  <li><span class="obscure" id="Considering+Parenthood_category">Considering Parenthood</span><a href="p_module_categories.php?id_division=d01&amp;id_category=002&amp;id_module=001&amp;page=1" aria-label="Considering+Parenthood_category">Considering Parenthood</a></li>
  <li><span class="obscure" id="Children%27s+Self-Esteem_category">Children's Self-Esteem</span><a href="p_module_categories.php?id_division=d01&amp;id_category=003&amp;id_module=001&amp;page=1" aria-label="Children%27s+Self-Esteem_category">Children's Self-Esteem</a></li>
</ul>
</body>
</html>

结果

  

该文件是有效的HTML5 + ARIA + SVG 1.1 + MathML 2.0

这让我相信sortSite会因为id元素的span属性与HTML 4规则冲突而抱怨。

HTML 4 specification要求id属性具有以下内容。

  

ID和NAME令牌必须以字母([A-Za-z])开头,后面可以跟任意数量的字母,数字([0-9]),连字符(&#34; - &#34 ;),下划线(&#34; _&#34;),冒号(&#34;:&#34;)和句号(&#34;。&#34;)。

HTML 5 specification只需要

  

该值不得包含任何空格字符。