Alt text and media types for preformatted text
caolan at caolan.uk
Mon Mar 1 09:10:28 GMT 2021
> > I like the ordering of content type first and alt text last
> So the sighted people with fancy syntax highlighting get to trivially
> read it line-by-line, but the people writing accessible software have to
> 1) seek forward to find the end of the preformatted text block; 2) read
> the alt text; then, if the user wants to display the preformatted block
> 3) jump backwards to the beginning of the preformatted text block and
> read it; then 4) skip past the last line of the preformatted text block
> so it isn't read again; then 5) continue parsing.
I agree that the most important principle is that a client choosing to implement accessibility features knows what to do with the following content. That's why I'm proposing content type first.
You might prefer to use the more ambiguous optional alt text and ask the user how to present the data each time. I have no idea if that is correct, someone who relies on a screen reader will have to enlighten me. But don't assume my motives. So far as I can tell, our priorities are the same.
More information about the Gemini