It is well documented that alt text not exceed 125 characters to accommodate the popular screen reader software JAWS limitations. Others recommend a limit of 100 characters.
Currently, Drupal Core sets the limit within the form UI to be 512 characters (see below):
<input data-drupal-selector="edit-field-media-image-0-alt" aria-describedby="edit-field-media-image-0-alt--wuABTCKzOQE--description" type="text" id="edit-field-media-image-0-alt--wuABTCKzOQE" name="field_media_image[0][alt]" value="" size="60" maxlength="512" class="form-text required" required="required" aria-required="true">
It would be a good idea then, to set the default character limit to be much lower or allow users to control this through configuration.
Don't see this functionality existing currently. Are there methods to accomplish this already?
Comments
Comment #2
osopolarThe hard limit in Database is 255 characters. The limit was increased from 80 to 100 characters in #3068756: Alternative Text/Title Display with 80 character limit. If that is not enough site admins may manually set the variable image_alt_length to a higher value, but need to make sure it's ≤ 255 characters.
Comment #3
osopolar