Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 字段集';div内的s图例未能通过pa11y WCAG 2.0_Html_Css_Section508_Wcag2.0_Pa11y - Fatal编程技术网

Html 字段集';div内的s图例未能通过pa11y WCAG 2.0

Html 字段集';div内的s图例未能通过pa11y WCAG 2.0,html,css,section508,wcag2.0,pa11y,Html,Css,Section508,Wcag2.0,Pa11y,我有如下字段集: <fieldset> <div class="input-left"> <legend class="legend-filters">Your full name:</legend> </div> <div class="input-right"> <!-- some input here ... --> </div> </fieldset> 这是假阳性

我有如下字段集:

<fieldset>
 <div class="input-left">
  <legend class="legend-filters">Your full name:</legend>
 </div>
 <div class="input-right">
  <!-- some input here ... -->
 </div>
</fieldset>
这是假阳性吗?或者在
div
中使用图例实际上会使某些用户无法访问它吗


编辑:将我的
div
class
input left
应用到
legend
元素可以满足我的需要。但是,我仍然希望在法规遵从性级别了解所需的内容。

如果您倾向于HTML 5.1(假设是这样,尽管代码中没有DTD),那么
必须是
的第一个子级:

:

作为元素的第一个子元素

-

如果将代码放入,则会返回错误:

错误:在此上下文中,元素图例不允许作为元素div的子元素。(正在抑制来自此子树的进一步错误。)

来自第9行第7列;第9行第37栏

t>↩      您的f

可使用元素的上下文:

作为元素的第一个子元素


您需要“更多地控制其放置位置”是什么意思?理想情况下,legend元素是fieldset元素的直接后代。MDN说:“允许的父元素:一个
的第一个子元素是这个
元素“。这篇文章也有助于阐明:我有一个错误的假设,
legend
在默认情况下不是块元素。MDN链接中的“允许的父级”引用正是我想要的。请随意添加一个合适的答案,我会选择它。
<fieldset>
 <legend class="legend-filters">Your full name:</legend>
 <div class="input-right">
  <!-- some input here ... -->
 </div>
</fieldset>