Skip to content

Flag images with no alt text at all #23

Closed
@Mr0grog

Description

@Mr0grog

I really like the idea behind this action! However, the first few images I tried to test it with didn’t get flagged like I expected.

In the first instance, I happened to drag an image into the text area that had a filename that wasn’t “Screenshot ” (it was “edit-link.png”). I’m not sure if there’s a good way to identify stuff like this (maybe check alt-text with no spaces against a dictionary? tough to handle lots of languages, though…).

In the second instance, I tried just deleting the alt text entirely (all the variations of <img alt="" ...>, <img ...> (no alt attribute at all), and ![](<image url>)). These seem more obviously straightforward to identify, and it would be nice if they were caught by this action.


As a side note, I thought I’d configured something wrong because of the above. The first thing I did was look at the action’s logging output, and it would have been a little bit helpful to have the two outputs (whether an image was flagged and the type of thing being checked) labeled so I knew what they were:

echo $flag
echo $type

(e.g. echo "Detected bad alt text: ${flag}" would have been helpful.)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions