When sites did not install the token module, or when users submit an empty alt / title value, the alt / title attributes will show up as empty.
<.... alt="" title="" ....>
This is not a huge deal, but not all sites run token. So 'we', the Drupal community, would end up running a lot of sites that show empty alt / title attributes, while we are more then capable of preventing this, and thus making it better, or at lest improve it a lil bit.
So i created a new option on the view mode page for image:
'Enforce non-empty attributes'
This enables the use of the file title in the case the token module is not installed - OR - if the submitted fields are empty. (edit node > clear alt+title > save node > view node).
This patch also makes core and file entity deal in the same way with empty title attributes, it just doesn't render them. An empty alt attribute will always render - as it should.
To be honest, i think this doesn't even require an option. If we document this behaviour enough, it should be fine - and be the default.
But as promised:
- Maybe use the node title if we are rendering on a node as the title attribute in combination with the file name?
(interesting to see what search engines will do with photo albums, including the albums with filenames with only numbers, or node/file title . album picture display id.)
|file_entity_enforce_non_empty_attributes_plus_fix_empty_title_consistency.patch||3.88 KB||Rob C|
|PASSED: [[SimpleTest]]: [MySQL] 308 pass(es). |
[ View ]