Ok so im using hubspot for inbound marketing and the have a thing called page grader that finds errors in your page. The most common warning is page has images without alt text. Since im dealing with a really big drupal site and dont want to go through every image and set an alt I would rather just have a JQuery script run check if it has alt if not add some plain default.
I have the easy part with setting the alt attribute
$(img).attr('alt', 'some text');
but Im not sure how to loop and find images that dont have alts because if they do have one set it is obviously going to be more relevant to search engines as well as people with disabilities who use the alt tags.