Cms: Feature request: alt tag field for assets by default

Created on 2 Nov 2019  路  5Comments  路  Source: craftcms/cms

Description

At the moment assets have title and filename fields by default.

Adding an Alt text field out the box will improve Craft's accessibility standards out the box for a lot of devs that may not remember to add this field for every project.

accessibility enhancement

All 5 comments

I was about to request this. I feel it's a wonderful enhancement which I would love to see.

I add an _Alt Text_ field to Asset field layouts intended for images鈥攚hich is most of them鈥攂ut there are cases like PDFs and .zip archives where it's not relevant.

I think this would be a healthy default as long as it could be turned off/removed for special cases.

I add an _Alt Text_ field to Asset field layouts intended for images鈥攚hich is most of them鈥攂ut there are cases like PDFs and .zip archives where it's not relevant.

I think this would be a healthy default as long as it could be turned off/removed for special cases.

Hi @mattstein, came to log this ticket again and I was correct in remembering I already logged it some time ago 馃槀. I usually add an 'alt text' field to my assets, but it would be great if it was added by default in the image config:

image

Hoping this eventually makes it's way into Craft 4 or even a version of 3.5!

I think it鈥檚 a great idea to promote accessibility considerations for content editors @JayBox325, I was just arguing for cases where it wouldn鈥檛 make sense to expose an _Alt Text_ field by default since Craft purposefully doesn鈥檛 make assumptions about the front end. alt and role might make sense for img tags, but the asset could be a non-image or used in a CSS background or something. Though the title would be moot at that point too, so maybe it鈥檚 already a self-defeating argument.

Ultimately I don鈥檛 know whether it鈥檇 be best handled by Craft core or an opinionated plugin focused on accessibility tools鈥攂ut luckily for both of us it鈥檚 not up to me! :)

I would say that alt text is part of the content of the image, not really file metadata, so it makes the most sense as a custom field that lives alongside other content. And we can鈥檛 add custom fields to assets by default in an installation because they are added via the volume鈥檚 field layout, and there aren鈥檛 any volumes in a default Craft install.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davist11 picture davist11  路  3Comments

bitboxfw picture bitboxfw  路  3Comments

RitterKnightCreative picture RitterKnightCreative  路  3Comments

richhayler picture richhayler  路  3Comments

mccombs picture mccombs  路  3Comments