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