Html: Proposal: App HTML, <html type="app">

Created on 3 Nov 2017  ·  3Comments  ·  Source: whatwg/html

My proposal is adding a new attribute to <html> tag to identify that the web page is a _web application_, App HTML.
This is an idea inspired AMP HTML specification; <html amp>.

Example:

<!doctype html>
<html type="app">
  <head>
    <meta charset="utf-8">
    <title>Sample App</title>
  </head>
  <body>
  </body>
</html>

benefits

In AMP HTML, the <html amp> attribution tells to browsers or crawlers that page is an AMP at the earliest phase without additional fetching and scripting.
Static analyzability is important. It can bring some benefits.

  • Browsers can optimize parsing/rendering/and more behaviors app-specifically.
  • Browsers can introduce new features only for App HTML.
  • App HTML can be free to drop out backward-compatibility to historical legacy features.

Most helpful comment

I recommend reading through https://whatwg.org/faq#adding-new-features. It's also worth noting that almost everyone regrets adding "standards mode" back in the day as we've been paying the cost for that ever since. Some folks are developing building blocks for the kind of thing you're proposing, with https://wicg.github.io/feature-policy/. That might be worth exploring first since if we were to ever add a new mode, it would have to come with an extremely detailed processing model and test suite. Building it up in small pieces is likely to lead to more success.

All 3 comments

I recommend reading through https://whatwg.org/faq#adding-new-features. It's also worth noting that almost everyone regrets adding "standards mode" back in the day as we've been paying the cost for that ever since. Some folks are developing building blocks for the kind of thing you're proposing, with https://wicg.github.io/feature-policy/. That might be worth exploring first since if we were to ever add a new mode, it would have to come with an extremely detailed processing model and test suite. Building it up in small pieces is likely to lead to more success.

It’s not exactly what you ask for, but <body role="application"> already exists and is meant to signal that the whole page is an application (in contrast to a document).
https://www.w3.org/TR/wai-aria/roles#application

Thanks for pointing that out. I'm going to close this issue for now. I hope the above resources help and please do come back if you have new ideas or have refined your application proposal!

Was this page helpful?
0 / 5 - 0 ratings