Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the "town hall" (meta-discussion site) for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Add an explicit Markdown syntax for decorative images

+4
−3

When uploading an image on a Codidact community, users are prompted to add alt text - a text alternative to an image - for that image. If they go to submit a post without doing so, or when submitting a post with blank alt text, they are reminded with a link to the help center page on alt text.

However, in certain cases, particularly for decorative images, blank alt text is the correct approach. The problem is that whether or not it's appropriate in a particular case is not something that can be detected programmatically, and so users who are correctly setting a decorative image to have blank alt text will still be prompted to set alt text for the image (although it will not prevent the post from being submitted with the default or blank alt text).

To make it clearer to the system and to any potential editors, though, I'd like to propose an explicit Markdown syntax for decorative images, which can then be served with blank alt text by the system.

This should be something like ![!decorative](image URL) - something unlikely to be used unintentionally and that makes it clear to both the system and human editors that this is an intentional usage of this syntax. The system then knows to serve this image with the alt attribute set to alt="".

Is something along these lines possible to add to the Markdown handling for QPixel?

History

2 comment threads

Where do you expect decorative images to be used here? (1 comment)
What's a "decorative" image? (3 comments)

3 answers

+1
−0

Mention decorative images in the reminder

Problem with a custom approach

I'm wary of adding something to Markdown that will be specific to Codidact (or even QPixel). Is there a way of doing this that would leave the Markdown still compatible with export to places that do not have that modification? I wouldn't want improved accessibility for Codidact to come at the cost of worsened accessibility in content exported by a well-meaning person.

Blank alt text is supported but not advertised

An author needs to be able to include an alt attribute, but have its value set to an empty string (""). Uploading an image gives Markdown with default text. If the author deletes this default text, the Markdown will go from being

![Image_alt_text](image_url)

which is converted to HTML as

<img alt="Image_alt_text" src="image_url">

to being

![](image_url)

which is converted to HTML as

<img alt="" src="image_url">

so the alt attribute is created even when blank, as required.

The reminder about alt text is shown when the author tries to save the post, but pressing save a second time accepts the empty alt text. So there is already a way to leave alt text empty, it just isn't advertised to the post author.

Problem with only reminding for the default text

I like the reminder being there when the alt text is left as the default, but if the author has actively deleted the alt text it's tempting to treat this as sufficient indication of a conscious decision that the reminder can be omitted. That is, we could only show the reminder for the default alt text, and not for empty alt text.

However, it is possible to write image Markdown directly, without using the upload tool, for example to include an image that is already at a URL rather than needing to be uploaded. Blank alt text here is not strong evidence of a conscious decision.

Explicit mention in the reminder

I propose that the reminder wording be amended to include mention of decorative images, so that the deletion of the default alt text is shown to be a valid approach for purely decorative images, but authors who manually write image Markdown still have a reminder to add alt text in all other cases.

Changes to other standards

This still leaves the raw Markdown not explicitly communicating to future readers that this decision is intentional. Other than HTML comments, I don't see a way of communicating this that would not also make the Markdown non-standard and therefore tied to Codidact.

Changes could be proposed to the HTML standard, or to CommonMark (the Markdown standard Codidact uses). Unless/until such changes are made, mentioning decorative images in the reminder is my preferred approach.

History

1 comment thread

Affirmation (1 comment)
+1
−1

Insert an HTML comment for a decorative image

A checkbox could be included in the Image Upload dialog box, allowing a user to indicate that the image is purely decorative:

Image upload dialog box with a checkbox for purely decorative images and a file input box

The Markdown that results from uploading an image could then have an HTML comment prepended to indicate to future editors that this image deliberately has no alt text for this reason:

<!-- This image has blank alt text because it is purely decorative -->
![](image_url)

Note that the newline between the HTML comment and the image Markdown is required, otherwise the image Markdown is not registered as Markdown and remains raw text in the rendered post.

This approach is compatible with both CommonMark (the Markdown standard Codidact uses) and HTML standards, so the post will still display correctly (and accessibly) if exported to anywhere that supports these standards.

History

1 comment thread

I feel this approach is a bit too low friction (3 comments)
+0
−4

There is already too much nanny-ware in the world, Codidact shouldn't be adding to it.

Whether an author includes alt-text for images, whether that alt-text is meaningful, or whether it is appropriate or unnecessary for a particular image is for the author to decide. This is not different from using proper grammar, spelling, and punctuation. The system shouldn't be interfering with author agency, style, and what information is presented.

Of course posts will be judged by all the other users, in part on quality items like grammar, spelling, punctuation, overall formatting, and the like. If you feel a post is badly written, then a downvote can be appropriate. If an image in a post didn't have alt-text but you feel strongly it should have, that's a legitimate reason for a downvote (hopefully with an explanatory comment).

In short, only the human users should be judging posts and dealing with them accordingly. Automated systems shouldn't be trying to make such judgement calls. Not only is it really annoying, but as your question points out, such systems don't have enough information to do the job right.

History

1 comment thread

I don't see a dismissable reminder as removing author agency (3 comments)

Sign up to answer this question »