Alt text and media types for preformatted text
oliversimmo at gmail.com
Sun Feb 28 22:57:48 GMT 2021
On Sun, 28 Feb 2021, 14:32 Caolan McMahon, <caolan at caolan.uk> wrote:
> 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.
The spec dosent have any sytax as of current, it's free form text.
Adding syntax to it it would only remove ambiguity.
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
> My suggestion would be to place type information after the opening ```,
> and alt-text after the closing ```, for the following reasons:
Gemtext is designed so it can be read line-by-line, top-to-bottom and be
Sticking text after the closing ``` that affects content would break this -
I presume that's why it's explicitly disallowed in the spec.
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.
Code highlighting is a good use case for this - but it would also ~sorta
allow for putting other content inline if we aren't careful on what's
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
> 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.
I like the ordering of content type first and alt text last, as Gemtext
works line-by-line top-to-bottom, knowing the content type first is good,
as it may affect following stuff.
But I think using the opening/closing toggles like this may cause
confusion, if you look at the line in isolation, you can't tell what the
text following it is. You're supposed to be able to tell how a line would
be structured/it's meaning by only looking at the first three lines.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gemini