MDL-30839 Accessibility - Focusing on error on submit

This commit is contained in:
Jason Fowler
2013-08-22 10:53:18 +08:00
parent 6050809347
commit 1b883b8c20
+1 -1
View File
@@ -2028,7 +2028,7 @@ function validate_' . $this->_formName . '_' . $escapedElementName . '(element)
ret = validate_' . $this->_formName . '_' . $escapedElementName.'(frm.elements[\''.$elementName.'\']) && ret;
if (!ret && !first_focus) {
first_focus = true;
frm.elements[\'id_error_'.$elementName.'\'].focus();
document.getElementById(\'id_error_'.$elementName.'\').focus();
}
';