我注意到<g:radioGroup/>
grails 不会将索引标记为其他值。前任。如果我的广播组有两个值,例如 True 和 False。当用户使用键盘选项卡时,它只突出显示 True 并停止,而不突出显示 False。因此,用户无法使用键盘选择其他选项。如何将 tabindex 作为第二个选项?我们有自己的无线电组,任何人都可以修改它以在所有值上实现选项卡索引吗?谢谢!
def myRadioGroup = {attrs ->
attrs.values.eachWithIndex { obj, i ->
out << "${attrs.labels[i]} "
out << "<input type='radio' name='${attrs.name}' value='${obj}'"
if(obj.equals (attrs.value)){
out << " checked='checked' "
}
if(attrs.function){
out << " ${attrs.function}"
}
if(attrs.disabled != null){
out << " disabled='disabled' "
}
out << " /> "
}
}
我尝试添加这个,但没有帮助。它仍然不会跳到下一个选项。
if(attrs.tabIndex != null){
out << " tabIndex='${i}' "
}