An alt value is supposed to be injected, the reason why this might not be working properly is being discussed in FriendsOfFlarum/upload300
On GitHub I didn't discuss your proposal for default values, but I'm curious whether this is related to any best practice or something observed in the wild.
What would be the benefit of injecting content of the post itself inside of the image ALT tag? It seems like it wouldn't provide much added value, neither to search engines nor screen readers? Isn't an empty alt tag better than an incorrect/"random" alt tag?
Also what would the alt tag be in replies? If the title of the discussion is used for every image alt in the discussion it seems like it would just make every screen reader confused, even more if there are multiple images one after another in the same post. The same legend would be read again and again?
I think the current solution (that appears to be broken) using the sanitized filename as the default alt value is the safest solution. That seems to be what GitHub uses as default Markdown alt tag as well.
010101 I tried manually adding title=test title
The provided bbcodes are quite limited. Unfortunately there's a lot of legacy choices in this extension and it's not easy to change everything without breaking anything. We could add some optional pass-through parameters, but for each bbcode parameter we need to ensure the data type is compatible with how it's injected, and we already have issues regarding non-ASCII legends so we'll probably need to fix those first.
Since a few versions we have introduced the Markdown image template which I think is one of the most flexible options as it continues to work even without Upload enabled, it allows using built-in Markdown options (alt, titles) and can benefit from extensions that aren't designed specifically for Upload (Lightbox, ...) But it also comes with disadvantages as it can't change its look automatically based on some factors (numbers of downloads, whether the file has been deleted, access permission) which are only possible with a custom bbcode that doesn't contain the URL itself but only the ID.