There is only one way to keep a rich text document truly accessible: its source
must be readable as plain text, the only aid allowed being pretty-printing.
HTML was designed to be like that, but it fails miserably since twenty years.
Fixing it
Take HTML5, leave out bizarre syntax for CDATA, entities and comments, add
back notation for empty tags (<br/>
) from XML, and close-any tags (</>
)
from SGML, settle on syntax for [expression] interpolation and directives (@if
, @each
, etc).
Introduce special syntax for special attribute types (IDs and classes) and unify all other attributes with cascading styles.
Work out pretty-printing*
making tags look more like compound brackets and restoring the symmetry between opening and closing ones.
This is a text block with ID=“sample”. Styles/options come after the tag and
ID enclosed in braces: .
Directives come right after,
as in this optional . Classes can
be ascribed as dot-subscipts to tags. Dynamic classes
are supported as well. Short-cut notation .\{name\};
stands for .\{name: name\}
.
To support Markdown-like syntax for figures
and links, attributes should be allowed to be placed alternatively in closing tags and tag type should default to spans/hyperlinks if left empty.
@rule
#ref2
{ref: //en.wikipedia.org/wiki/Markdown}