Reconsidering Pre and Reflow

To Accessibility Public,
I think the time of Pre has passed for everything except "typewriter art".
We entered the computer era with all literature text files, end of line,
spaces and return symbols. That is "preformatted text".

As the web has progressed, "preformatted structures" have replaced with
semantic structures because that's what markup is about. Today we are down
to only a few stragglers:

Typewriter Art - Pictures in typewriter symbol. e e cummings poetry falls
in that category.

Poetry: Couplets, Quatrains, Sonnets, Haiku, Pentameter still use Pre.

Display Code: A presentation of programming language constructs for the
purpose of instruction / documentation.

Typewriter art is a picture in text. It is by necessity preformatted.
Poetry is solved by making stanzas paragraphs with breaks at the end of
each  lines.

That leaves display code. Code should really have its own complex structure
of elements like lists, tables or forms, but these don't exist. What do we
do?

First let's ask honestly, does preformatted text fail Reflow (1.4.10) for
display code.  We must ask what is functional display code at 320 CSS
pixels? Display code must:

   1. be produced by authors with relative ease,
   2. preserve the formatting conventions for the programming language,
   3. support discussion effectively,
   4. cut and pasted into a text editors,

There are a few techniques to enlarge and support reflow, if the pre
formatting is not weird. So, we can write good techniques for formatting
the pre for display code so it reflows and is somewhat readable. The best I
can say for these displays is they are not terrible. None meets the
functionality of display code for normal readers.

As a person who reads a lot of code, taught computer sciences for 30 years,
and wrote compilers and interpreters professionally,  I think preformatted
code in large print restyled as well as it can be is a failure as a medium.
It is hard to read, hard to teach and it does not represent the conventions
of coding.

So, do we live with it or try something new? I think it is time to change.
What we have now doesn't really work. It fails me, and I know what I'm
doing. Here is my start. It works on all block-structured languages. It is
much better than pre. It meets (1) through (4).

http://nosetothepage.org/reflowDisplayCode.html

My technique is not perfect, but it beats the pants off any Pre format.

Best, Wayne

Received on Tuesday, 5 February 2019 21:51:33 UTC