SortSite Text Not Allowed 消息
SortSite Text Not Allowed message
我正在使用 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&id_category=001&id_module=001&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&id_category=002&id_module=001&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&id_category=003&id_module=001&page=1" aria-label="Children%27s+Self-Esteem_category">Children's Self-Esteem</a></li>
</ul>
我只是 运行 你的 HTML 在 html5.validator.nu 对抗 HTML 5 验证者,像这样
<!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&id_category=001&id_module=001&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&id_category=002&id_module=001&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&id_category=003&id_module=001&page=1" aria-label="Children%27s+Self-Esteem_category">Children's Self-Esteem</a></li>
</ul>
</body>
</html>
结果
The document is valid HTML5 + ARIA + SVG 1.1 + MathML 2.0
这让我相信 sortSite 抱怨是因为您的 span
元素的 id
属性与 HTML 4 规则冲突。
HTML 4 specification 需要以下 id
属性。
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
The value must not contain any space characters.
我正在使用 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&id_category=001&id_module=001&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&id_category=002&id_module=001&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&id_category=003&id_module=001&page=1" aria-label="Children%27s+Self-Esteem_category">Children's Self-Esteem</a></li>
</ul>
我只是 运行 你的 HTML 在 html5.validator.nu 对抗 HTML 5 验证者,像这样
<!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&id_category=001&id_module=001&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&id_category=002&id_module=001&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&id_category=003&id_module=001&page=1" aria-label="Children%27s+Self-Esteem_category">Children's Self-Esteem</a></li>
</ul>
</body>
</html>
结果
The document is valid HTML5 + ARIA + SVG 1.1 + MathML 2.0
这让我相信 sortSite 抱怨是因为您的 span
元素的 id
属性与 HTML 4 规则冲突。
HTML 4 specification 需要以下 id
属性。
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
The value must not contain any space characters.