One workaround to this would be to change
<div class="iHaveBgImage">
this text should be displayed if bg image is not loaded
</div>
.iHaveBgImage { background-image: url('img.png') }
To :
<img src="img.png" alt="Seems like this image failed to load" />
Alternatively I am not sure if the following would work, but you can MAYBE do something along the lines of:
<img class="iHaveBgImage" alt="Seems like this image failed to load" />
.iHaveBgImage { background-image: url('img.png') }
EDIT: Something that just popped up in my head that could possibly also work would be to have:
<div class="iHaveBgImage">
<p class="bgText">this text should be displayed if bg image is not loaded</p>
</div>
.iHaveBgImage {
background-image: url('img.png')
}
.bgText {
z-index: -9999;
}