Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrew Howard 2 posts 82 karma points
    Mar 01, 2024 @ 02:24
    Andrew Howard
    0

    Mandatory Alt Text for Images

    Hey everyone,

    On Umbraco 12 and trying to figure out a way to make a properly mandatory Alt Text field for whenever/however images get uploaded.

    Currently we have a "mandatory" field property for alt text in the media library for "image" files. However you can upload/drag and drop into the folder and bypass this field and click save. The field only becomes available and mandatory if you then click into your just uploaded file in the tree structure (our users won't do this, we need the upload process to fail unless the field is filled out!)

    Another issue we encounter is that via any kind of media picker or multi-tree picker (set to media node), users can upload images, again completely bypassing the alt text field unless they then go back into their just uploaded file...

    Is there a way to flag up mandatory fields during the save process? This would make it impossible to upload images without associated alt text which is exactly what we need for good built-in accessibility.

    Would love to hear other people's experience in this area!

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Mar 02, 2024 @ 17:24
    Huw Reddick
    0

    Not sure you would be able to do that as the drag and drop does not provide access to any other fields

  • Sebastian Dammark 583 posts 1407 karma points
    Mar 06, 2024 @ 08:11
    Sebastian Dammark
    100

    There is no workaround for this, without developing your own upload method.

    Maybe the easiest solution would be, only to be able to pick media where the alt text is present. But that would also require you to develop your own media picker.

    In the good old days it was possible with xPath to define the accepted types this way: image[string(altText)]

    This would only allow you to pick an image where the altText property exists and is NOT empty.

    Now all you can do is pick the type. enter image description here

  • Andrew Howard 2 posts 82 karma points
    Mar 11, 2024 @ 19:14
    Andrew Howard
    0

    Thanks for suggestions and clarifying there is no easy way to do this!

Please Sign in or register to post replies

Write your reply to:

Draft