私は現在、次のようなフォームを持っています:
<form action="#">
<select {if $isPostRequest}disabled="disabled" {/if}size="1" name="locale"
onchange="location.href={if $languageToggleNoUser}'{$currentUrl|escape}{if strstr($currentUrl, '?')}&{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 エラーが発生します。
このコードを変更して送信ボタンを含める方法を考えています。onchange オプションのコードは非常に複雑で、私には理解できません。
ありがとう。