更改表单以包括WCAG的提交按钮 [英] Changing form to include a submit button for WCAG

查看:99
本文介绍了更改表单以包括WCAG的提交按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前的格式如下:

<form action="#">
    <select {if $isPostRequest}disabled="disabled" {/if}size="1" name="locale" 
onchange="location.href={if $languageToggleNoUser}'{$currentUrl|escape}{if strstr($currentUrl, '?')}&amp;{else}?{/if}setLocale='+this.options[this.selectedIndex].value{else}('{url|escape:"javascript" page="user" op="setLocale" path="NEW_LOCALE" source=$smarty.server.REQUEST_URI}'.replace('NEW_LOCALE', this.options[this.selectedIndex].value)){/if}" class="selectMenu">{html_options options=$languageToggleLocales selected=$currentLocale}</select>
</form>

当前会导致WCAG 2.0错误,如所有表单都需要提交按钮

It currently causes a WCAG 2.0 error, as all forms need a submit button.

我想知道如何更改此代码以包含提交按钮。 onchange选项的代码非常复杂,我不理解。

I'm wondering how I could change this code to include a submit button. The code for the onchange option is quite convoluted, and I don't understand it.

谢谢。

推荐答案

WCAG 2.0不需要具有提交按钮。您所链接的是一种技术,它是信息性的(不是规范性的),它只是实现准则 3.2.2

WCAG 2.0 does not require to have a submit button. What you link to is a technique, which is informative (not normative), and it’s only one of possibly many ways to achieve the guideline 3.2.2.

因此它可以符合没有提交的要求按钮,例如

So it can be conforming to have no submit button, for example when


在使用组件之前已告知用户该行为

the user has been advised of the behavior before using the component

相关技术: G13:描述在对导致上下文发生变化的表单控件进行更改之前会发生什么

这篇关于更改表单以包括WCAG的提交按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆