gpt4 book ai didi

html - 更改表单以包含 WCAG 的提交按钮

转载 作者:行者123 更新时间:2023-11-27 23:59:57 26 4
gpt4 key购买 nike

我目前有这样的表格:

<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 错误,如 all forms need a submit button .

我想知道如何更改此代码以包含提交按钮。 onchange选项的代码比较绕,没看懂。

谢谢。

最佳答案

WCAG 2.0 不需要提交按钮。您链接到的是一种技术,它具有信息性(非规范性),并且它只是实现指南 3.2.2 的众多可能方法之一。 .

所以它可以符合没有提交按钮,例如当

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

相关技术:G13: Describing what will happen before a change to a form control that causes a change of context to occur is made

关于html - 更改表单以包含 WCAG 的提交按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21819437/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com