To meet the requirements for accesibility, an image must either have alternative text or be marked as decorative. In Enonic we can add alternative text…we wish we could also mark an image as decorative.
When writing an alternative text we have to remember that the text should be in the context of the article around the image.
That is why we don’t use the alt-text on the image content, but always pair an
ImageSelector with a
I would have loved to see an alt-text input-field on the
ImageSelector. And having a control that makes that text field “not required” if a checkbox saying it’s decorative is checked.
Problem is that this would have to change how the output of the imageSelector is stored. Basically store a propertySet array, rather than a reference array.
Technically, a image without alt text could automatically be flagged as decorative in the frontend.
Is that ok, or does the editor need to be forced into making a decision here?
Yea, you are completely correct Thomas. I was a little bit fried in the head at the end of the day yesterday when I wrote it, so it wasn’t my best idea…
Unfortunately, it does happen that the writers forget to insert alternative text in cases when it definitly should have been done:-)
An automatic function stating that an image is decorative when alt.txt is missing could hide the fact that we have actually made a mistake. I would prefer a check box or similar that requires us to take an active, conscious action that a picture is decorative.
Hi… We have been chewing on this for a while, and come to the following conclusion:
When inserting an image, we will no longer pre-fill alt text from image name. Also, if the alt text field is empty - we will show a background text in the input field, saying “Decorative image”. Also, this will store an alt=“” in the data, just like we do today.
So, there will be no forcing of selecting “decorative”, and no “coincidential” alt texts.
It’s definitly a good thing that you don’t pre-fill the alt text with image name
I’m unsure if I understood what you said about “Decorative image”. What we would like is the option for an editor to “mark a picture as decorative” for screen readers. Sometimes this is done in the code by developers, but sometimes it has to be done by editors. Will this solution give us that option?
If Alt text field is left empty then the image will be considered decorative.
The problem with that is that editors sometimes forget to add alt.txt. If I understand correctly we will get no report from Siteimprove (or similar tools) that a picture are missing alt.txt. That’s the reason why we would like to force some kind of action from the editor to mark a picture as decorative (in cases where this is not done by developers in the layout/framework/content type).
Hei Lars Erik - new iteration:
Basically, we then offer a radio-button field “Accessibility” which is required. If the image inserted already has an alt text, this will be copied in, and activated. If not, user must choose decorative vs alt text and fill in the text in the latter case. See screenshot
That looks great