- Issue created by @zserno
- π¨π¦Canada mandclu
While I 100% agree that this would be best practice, I wonder if some site admins would be concerned that the checkbox would be abused, e.g. authors would just always use it instead of taking the time to write alt text. Would it make sense to have a form setting to enable display of the checkbox, and set it to enable by default?
- Status changed to Needs work
over 1 year ago 11:13am 21 September 2023 - πͺπ¨Ecuador jwilson3
-
I wonder if some site admins would be concerned that the checkbox would be abused, e.g. authors would just always use it instead of taking the time to write alt text.
We already have an option to disable the alt text field which is just as dangerous and ripe for abuse.
- Disabling the alt text option currently just removes the attribute entirely from the IMG tag, but I would argue that we should make alt text and aria-hidden behave consistently. When empty, add alt="" on IMG tag or aria-hidden on inline SVG tag. When not empty add alt text value on IMG tag and add aria-label containing the alt text value on inline SVGs (per the proposal on β¨ Use aria-label for 'Enable alt attribute' when 'Output SVG Inline' is enabled Postponed: needs info ).
- If this approach πmakes sense, then I think it could actually be achieved through clever configuration of existing field options without necessarily adding a new aria hidden option. Namely, enable the alt field but make it optional (ie. not required) on the field config and then just have authors leave the alt text blank when uploading.
- If this ππ approach doesn't make sense then at the very least, we must hide the aria hidden checkbox field when "Output SVG inline" is unchecked using #states api.
-
- First commit to issue fork.