For accessibility, I'm trying to add a tabindex attribute to the captcha image.
Here is the script I'm using:
document.addEventListener("DOMContentLoaded", function(){
document.getElementById("ctl00_ContentContainer_EntityFormControl_aeace8755f5aec118f8f000d3a5b28d1_EntityFormControl_aeace8755f5aec118f8f000d3a5b28d1_EntityFormView_captcha_CaptchaImageUP").tabIndex = 0;
alert(‘page loaded successfully’);
});
The script can't seem to find the image tag by the id. What am I missing here?