帖子提交 URL 如下所示:
default.cfm?fuseaction=Seasons.edit&sid=2569#errors
我为我的错误添加了一个内部锚点。代码如下所示:
<a name="errors"/>
<div id="errors">
<p>An error has occured:</p>
<ul>
<li><label for="name">Missing or invalid season name, click to jump there</label></li>
</ul>
</div>
<form action="#errors" id="gronk" method="post">
<fieldset>
<legend>Edit Season</legend>
<div class="row">
<span class="cell">
<label for="name"><span class="required">* </span>Season name<span class="wcag_hide"> Required string</span></label>
<input type="text" name="name" id="name" class="formFields" value="" />
</span>
</div>
...
这是使错误报告可访问的有效方法吗?
我曾想过把它改为,但我相信它只适用于 IE:
...
<li><a href="#name">Missing or invalid season name, click to jump there</a></li>
...