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

标签 html accessibility wcag wcag2.0

我目前有一个像这样的表格:

<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/

相关文章:

javascript - 古怪的 Javascript

html - 在 Bootstrap 中,如何增加列表项之间的间距?

android - 向后兼容 AccessibilityTraversalOrder

java - 为色盲人士增强图像

html - 在 HTML 中标记隐式列标题以实现可访问性

javascript - 页面加载后强制聚焦 ~unique

javascript - 启用禁用 Font Awesome 图标

java - html5 libgdx 应用程序在哪里保存首选项文件?

html - VoiceOver 大写的小词被读为缩写

javascript - 屏幕阅读器 aria 实时断言文本被中断