There should be a subset of JS for text-only browsers.
How common are text-only browsers? What’s the use case here?
If you’re talking about displaying web content in a fixed-width character grid, like on a teletype or terminal console…then this is an interest of mine too. I find thinking about text-based browsers useful, when reasoning over progressive enhancement and accessibility technology.
A more interesting question might be what to do about the CSS layout and its box model. CSS already supports things like
tty media queries…but what about all the existing web content that is not designed for character grids? Should pixels be rounded to the nearest character cell; what about other length units? How should the application deal with poorly accessible websites—should it enable nudging or expanding specific content boxes that could not otherwise be fully read on the TUI? These are all very interesting questions that should, theoretically, be solveable without adding much to the standards. It’s mostly up to the developers here to figure all this out.
It’s a shame that TUI web browsers nowadays support hardly any of the new standards, let alone even CSS text styling, but we can hardly blame them.
TL;DR: There’s probably little to do with the standards yet. It’s up to developers to develop a modern text web browser first, one that can browse the web of today.