a11y: add alert role when displaying errors in live validation (#76958)
gitea/wcs/pipeline/head This commit looks good
Details
gitea/wcs/pipeline/head This commit looks good
Details
This commit is contained in:
parent
4d5b309986
commit
928b9a66cb
|
@ -1022,6 +1022,7 @@ const LiveValidation = (function(){
|
|||
}
|
||||
|
||||
const errorElMessage = document.getElementById(`error_${this.name}_${errorType}`).innerHTML
|
||||
this.errorEl.setAttribute('role', 'alert')
|
||||
this.errorEl.innerHTML = errorElMessage
|
||||
if(overrideMsg) {
|
||||
const errorMessageContainer = this.errorEl.querySelector(`#error_${this.name}_${errorType}_message`)
|
||||
|
|
Loading…
Reference in New Issue