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

View Raw

More Information

⬅️ Previous capture (2021-11-30)

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

<-- back to the mailing list

[Clients] Gemini and accessibility regarding preformatted code blocks

Rohan Kumar seirdy at seirdy.one

Thu Feb 25 23:08:50 GMT 2021

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

On Thu, Feb 25, 2021 at 05:25:08PM -0500, Sean Conner wrote:

I might suggest something like:
preformat = "```" [ [WSP] tag ] [ [WSP] alt-text] end-of-line
tag = '@art' / '@code' / '@data' / '@poem'
Some examples:
``` @code
x = 5
```
``` @art Obligatory Cat picture
cat
```
``` @data Price list
widget 3.45
gadget 5.99
fob 1.99
```
``` @poem
There once was a person from Nantucket ...
```
``` Just some regular alt-text
blah
```
```
nothing special here
```

I think that a small but significant change to the spec is necessary here. My proposal:

- Three backticks signify readable preformatted text (e.g. a code snippet or a poem); screen-readers should not skip this.- Four backticks signify something that isn't readable, like ascii-art.

This is consistent with the spirit of gemtext: characters at the beginning of a line are the only way to describe semantics.

Benefits of this proposal:

- It doesn't break any existing sites; it just adds one feature.- It's very simple to implement: parsers scan for a single additional backtick- Authors can still provide any alt-text they wish without worrying about "reserved words" like the proposed tags- It provides *critical* semantic information: whether or not a block of preformatted text should be treated as readable text.

I'm generally against gemtext spec changes, but I think this is necessary for screenreader-friendliness.

-- /Seirdy-------------- next part --------------A non-text attachment was scrubbed...Name: signature.ascType: application/pgp-signatureSize: 898 bytesDesc: not availableURL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20210225/608dc54c/attachment.sig>