0

我尝试了几种方法来让这个控件通过 508 合规性测试,但它们似乎都失败了。我没有得到测试人员的反馈,只有通过/失败。我怀疑这与在单选按钮周围自动呈现的表格有关。我怀疑标签必须在表格内,这不是 RadioButtonList 的选项。以下是我尝试过但失败的方法。

字段集/图例解决方案

ASP/NET 页面:

<fieldset>
<legend>Review By:</legend>
<asp:RadioButtonList runat="server" ID="FilterType" AutoPostBack="true" Width="100%"
       BorderWidth="1"   OnSelectedIndexChanged="FilterType_OnSelectedIndexChanged" />
</fieldset>

呈现的 HTML:

<fieldset>
<legend>Review By:</legend>
<table id="ctl00_contentBody_FilterType" border="0" style="border-width:1px;
border-style:solid;width:100%;">
        <tr>
<td><input id="ctl00_contentBody_FilterType_0" type="radio"
name="ctl00$contentBody$FilterType" value="1" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$0
\',\'\')',  0)" /><label for="ctl00_contentBody_FilterType_0">Attending MD</label>
</td>
        </tr><tr>
<td><input id="ctl00_contentBody_FilterType_1" type="radio"
name="ctl00$contentBody$FilterType" value="2" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$1
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_1">CERMe Review 
Types</label></td>
        </tr><tr>
<td><input id="ctl00_contentBody_FilterType_2" type="radio" 
name="ctl00$contentBody$FilterType" value="3" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$2
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_2">Treating 
Specialty</label></td>
        </tr><tr>
<td><input id="ctl00_contentBody_FilterType_3" type="radio" 
name="ctl00$contentBody$FilterType" value="4" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$3
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_3">Ward Location</label>
</td>
        </tr>
</table>
</fieldset>

使用 AssociatedControlID 将控件链接到标签

ASP.Net 页面:

<asp:Label ID="lblHiddenReviewType"  AssociatedControlID="FilterType" runat="server">
<div>Review Type:</div></asp:Label> 
<asp:RadioButtonList runat="server" ID="FilterType" AutoPostBack="true" Width="100%"
BorderWidth="1" OnSelectedIndexChanged="FilterType_OnSelectedIndexChanged" />

呈现的 HTML:

<td>
            <label for="ctl00_contentBody_FilterType"  
id="ctl00_contentBody_lblHiddenReviewType"><div>Review Type:</div></label> 
                <table id="ctl00_contentBody_FilterType" border="0" style="border-
width:1px;border-style:solid;width:100%;">
        <tr>
            <td><input id="ctl00_contentBody_FilterType_0" 
type="radio" name="ctl00$contentBody$FilterType" value="1" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$0
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_0">Attending MD</label></td>
        </tr><tr>
            <td><input id="ctl00_contentBody_FilterType_1"   
type="radio" name="ctl00$contentBody$FilterType" value="2" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$1 
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_1">CERMe Review Type</label>
</td>
        </tr><tr>
            <td><input id="ctl00_contentBody_FilterType_2" 
type="radio" name="ctl00$contentBody$FilterType" value="3" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$2
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_2">Treating 
Specialty</label></td>
        </tr><tr>
            <td><input id="ctl00_contentBody_FilterType_3" 
type="radio" name="ctl00$contentBody$FilterType" value="4" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$3
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_3">Ward Location</label>
</td>
        </tr>
    </table>

            </td>

用自己的面板包围控件

ASP.Net 页面:

<asp:Panel id="pnlRadial" GroupingText="Review Type: " runat="server">
<asp:RadioButtonList runat="server" ID="FilterType"  AutoPostBack="true" Width="100%"
 BorderWidth="1" OnSelectedIndexChanged="FilterType_OnSelectedIndexChanged" />
</asp:Panel>

呈现的 HTML:

<div id="ctl00_contentBody_pnlRadial">
<fieldset>
<legend>Review Type:</legend>
<table id="ctl00_contentBody_FilterType" border="0" style="border-width:1px;border-
style:solid;width:100%;">
                <tr>
<td><input id="ctl00_contentBody_FilterType_0" type="radio" 
name="ctl00$contentBody$FilterType" value="1" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$0
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_0">Attending MD</label></td>
                </tr><tr>
<td><input id="ctl00_contentBody_FilterType_1" type="radio" 
name="ctl00$contentBody$FilterType" value="2" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$1
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_1">Reviewer</label></td>
                </tr><tr>
<td><input id="ctl00_contentBody_FilterType_2" type="radio" 
name="ctl00$contentBody$FilterType" value="4" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$2
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_2">Treating 
Specialty</label></td>
                </tr><tr>
<td><input id="ctl00_contentBody_FilterType_3" type="radio" 
name="ctl00$contentBody$FilterType" value="5" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$3
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_3">Ward Location</label>
</td>
                </tr><tr>
<td><input id="ctl00_contentBody_FilterType_4" type="radio" 
name="ctl00$contentBody$FilterType" value="3" 
onclick="javascript:setTimeout('__doPostBack(\'ctl00$contentBody$FilterType$4
\',\'\')', 0)" /><label for="ctl00_contentBody_FilterType_4">Service Section</label>
</td>
                </tr>
</table>
</fieldset>
</div>

任何帮助将不胜感激 !!

4

1 回答 1

0

我会要求测试人员提供比通过/失败更多的信息,至少是他们用来测试的信息。也许要求第 508 节协调员参与其中可能会有所帮助。您的第一个或第二个片段应该通过。合规的解决方案如下所示:

<fieldset>
 <legend>Review type</legend>
 <table role="presentation"> //bonus for the role, not required
  <tr>
   <td>
    <input id="option1" name="myGroup" type="radio" />
   </td>
   <td>
    <label for="option1">Option 1</label>
   </td>
  </tr>
  <tr>
   <td>
    <input id="option2" name="myGroup" type="radio" />
   </td>
   <td>
    <label for="option2">Option 2</label>
   </td>
  </tr>
  ....
 </table>
</fieldset>
于 2013-03-20T14:53:19.477 回答