💾 Archived View for rawtext.club › ~sloum › geminilist › 005732.gmi captured on 2023-09-28 at 17:04:04. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

<-- back to the mailing list

Alt text and media types for preformatted text

Caolan McMahon caolan at caolan.uk

Sun Feb 28 14:32:12 GMT 2021

- - - - - - - - - - - - - - - - - - - 

Hello all,

This is in response to the various alt-text / content type suggestions floating around.

I'm uncomfortable with inventing a new syntax to combine these two pieces of data for two reasons. First, new syntax complicates the spec. Second, any ambiguity will reduce the usefulness both to a client.

Ideally, the two would be separate. Most suggestions I've seen so far were to follow the opening ``` of a preformatted block with a mix of this data. However, there is also the option of adding data after the closing ``` marker, keeping the two separate.

My suggestion would be to place type information after the opening ```, and alt-text after the closing ```, for the following reasons:

1. Even for accessibility, I suspect knowing the content type is more practically useful to the client in the majority of existing cases. Most ASCII art is purely decoration, and knowing the content type is text/x-ascii (or similar) upfront is important so the screen reader can simply skip it.2. Knowing the content type upfront would allow clients to present streaming data correctly using appropriate colours and escape codes for code highlighting, for example.3. Placing the content type after the opening ``` line is familar to markdown authors, which is not a reason in itself, but a welcome bonus nonetheless.4. Placing the alt text after the closing ```, at the end of the preformatted block has a nice symmetry with links which place the human-friendly text at the end too.

For now, I have no opinion on the format of content type labels.

Caolan