Button DisplayType=ImageButton Bugs
Posted: May 8th, 2023, 11:32 pm
I was setting up a button with DisplayType=ImageButton for documentation and found some things that I think dont work like they should.
Bug 1: Alternative Text not added
When setting up a button, if you set the DisplayType to ImageButton, it will change it to an img tag. But in setting up an image control, if you put a value in the AlternateText property it becomes the alt property in the img tag. I would expect it to also here, but it isnt happening.
Bug 2: If the url given is invalid, I expected the broken image icon to show, but it wasnt
See here my site has an invalid image for the logo, so the alt text is showing But for the ImageButton, when set to the same invalid url, it just looks like nothing is there
I inspected the page and found that if I remove the title attribute, give the title attribute a value, or add back the alt attribute, it shows how I expected.
entirely removed:
Bug 1: Alternative Text not added
When setting up a button, if you set the DisplayType to ImageButton, it will change it to an img tag. But in setting up an image control, if you put a value in the AlternateText property it becomes the alt property in the img tag. I would expect it to also here, but it isnt happening.
Bug 2: If the url given is invalid, I expected the broken image icon to show, but it wasnt
See here my site has an invalid image for the logo, so the alt text is showing But for the ImageButton, when set to the same invalid url, it just looks like nothing is there
I inspected the page and found that if I remove the title attribute, give the title attribute a value, or add back the alt attribute, it shows how I expected.
entirely removed: