Congratulations!

[Valid RSS] This is a valid RSS feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://blog.whatwg.org/feed/

  1. <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
  2. xmlns:content="http://purl.org/rss/1.0/modules/content/"
  3. xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  4. xmlns:dc="http://purl.org/dc/elements/1.1/"
  5. xmlns:atom="http://www.w3.org/2005/Atom"
  6. xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  7. xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  8. >
  9.  
  10. <channel>
  11. <title>The WHATWG Blog</title>
  12. <atom:link href="https://blog.whatwg.org/feed" rel="self" type="application/rss+xml" />
  13. <link>https://blog.whatwg.org</link>
  14. <description>Please leave your sense of logic at the door, thanks!</description>
  15. <lastBuildDate>Wed, 25 Oct 2023 05:30:02 +0000</lastBuildDate>
  16. <language>en-US</language>
  17. <sy:updatePeriod>
  18. hourly </sy:updatePeriod>
  19. <sy:updateFrequency>
  20. 1 </sy:updateFrequency>
  21. <generator>https://wordpress.org/?v=6.4.4</generator>
  22. <item>
  23. <title>The URL Pattern Standard</title>
  24. <link>https://blog.whatwg.org/url-pattern-standard</link>
  25. <comments>https://blog.whatwg.org/url-pattern-standard#comments</comments>
  26. <dc:creator><![CDATA[Domenic Denicola]]></dc:creator>
  27. <pubDate>Wed, 25 Oct 2023 05:30:02 +0000</pubDate>
  28. <category><![CDATA[What's Next]]></category>
  29. <category><![CDATA[WHATWG]]></category>
  30. <guid isPermaLink="false">https://blog.whatwg.org/?p=13100</guid>
  31.  
  32. <description><![CDATA[Welcome to the newest standard maintained by the WHATWG: the URL Pattern Standard! The URL Pattern Standard gives a generic pattern syntax for matching URLs, and extracting the parts from them. It is inspired by the path-to-regexp library, although it extends beyond paths to encompass all the parts of a URL. You can read more [&#8230;]]]></description>
  33. <content:encoded><![CDATA[
  34. <p>Welcome to the newest standard maintained by the WHATWG: the <a href="https://urlpattern.spec.whatwg.org/">URL Pattern Standard</a>! The URL Pattern Standard gives a generic pattern syntax for matching URLs, and extracting the parts from them. It is inspired by the <a href="https://github.com/pillarjs/path-to-regexp">path-to-regexp</a> library, although it extends beyond paths to encompass all the parts of a URL. You can read more about the API <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API">on MDN</a>.</p>
  35.  
  36.  
  37.  
  38. <p>The URL Pattern Standard joins us as a graduation from the <a href="https://wicg.io/">WICG</a>, where it was authored by Ben Kelly. As part of the move to becoming a Living Standard, Jeremy Roman and Shunya Shishido are joining Ben as editors to help maintain and evolve the standard.</p>
  39.  
  40.  
  41.  
  42. <p>We see the URL Pattern Standard being adopted in many upcoming proposals, including <a href="https://github.com/WICG/nav-speculation/blob/main/triggers.md#document-rules">speculation rules</a>, <a href="https://github.com/WICG/compression-dictionary-transport#dictionary-options-header">compression dictionary transport</a>, and <a href="https://github.com/WICG/service-worker-static-routing-api#a-proposal">service worker static routing</a>. It has also seen adoption with implementations beyond web browsers, such as in <a href="https://deno.land/api@v1.37.2?s=URLPattern">Deno</a>, <a href="https://developers.cloudflare.com/workers/runtime-apis/web-standards/#urlpattern-api">Cloudflare Workers</a>, <a href="https://nextjs.org/docs/pages/api-reference/edge">Next.js Edge Runtime</a>, and <a href="https://www.netlify.com/blog/introducing-netlify-functions-2-0/">Netlify Functions</a>. We are excited to provide a home for this primitive going forward.</p>
  43. ]]></content:encoded>
  44. <wfw:commentRss>https://blog.whatwg.org/url-pattern-standard/feed</wfw:commentRss>
  45. <slash:comments>1</slash:comments>
  46. </item>
  47. <item>
  48. <title>Retro-specifying fetch/performance</title>
  49. <link>https://blog.whatwg.org/retro-specifying-fetch-performance</link>
  50. <dc:creator><![CDATA[Noam Rosenthal]]></dc:creator>
  51. <pubDate>Thu, 17 Mar 2022 16:07:01 +0000</pubDate>
  52. <category><![CDATA[Processing Model]]></category>
  53. <guid isPermaLink="false">https://blog.whatwg.org/?p=13086</guid>
  54.  
  55. <description><![CDATA[In the last year or so, my main task was to tackle some of the "specification technical debt" that had been accumulating over a few years, specifically at the crossroads of Fetch, performance APIs, and the HTML Standard. Monkey patching and hand waving When starting this work, the behaviors of some of the features relating [&#8230;]]]></description>
  56. <content:encoded><![CDATA[
  57. <p>In the last year or so, my main task was to tackle some of the "specification technical debt" that had been accumulating over a few years, specifically at the crossroads of <cite><a href="https://fetch.spec.whatwg.org/">Fetch</a></cite>, <a href="https://github.com/w3c/web-performance">performance APIs</a>, and the <a href="https://html.spec.whatwg.org/multipage/">HTML Standard</a>.</p>
  58.  
  59.  
  60.  
  61. <h3 class="wp-block-heading">Monkey patching and hand waving</h3>
  62.  
  63.  
  64.  
  65. <p>When starting this work, the behaviors of some of the features relating to web performance were specified in the form of "monkey patching" — describing how another spec needs to be modified rather than modifying it; or "hand waving" — describing the expected behavior of a feature in general or vague terms.</p>
  66.  
  67.  
  68.  
  69. <p>These ways of specifying have an advantage at early stages of specification, and allow moving fast without requiring consensus prematurely.</p>
  70.  
  71.  
  72.  
  73. <p>However, as the specs mature and become widely used, these practices accumulate and come with a few costs.</p>
  74.  
  75.  
  76.  
  77. <h3 class="wp-block-heading">Interoperability</h3>
  78.  
  79.  
  80.  
  81. <p>Some details and flows may be too vaguely defined in the hand-waved description or monkey-patch. This, in turn, creates interoperability issues — one browser vendor may interpret a loosely defined phrase in some way, and another vendor in a different way.</p>
  82.  
  83.  
  84.  
  85. <p>Example: <cite><a href="https://w3c.github.io/resource-timing/">Resource Timing</a></cite> specified that loading images should result in a resource timing entry. However, it was not specified (or tested) whether those entries should be added before or after the image's <code>load</code> event.</p>
  86.  
  87.  
  88.  
  89. <h3 class="wp-block-heading">Bugs and security flaws</h3>
  90.  
  91.  
  92.  
  93. <p>When having to spell out all the details of a previously loose spec, sometimes bugs and security/privacy flaws emerge. This has happened as part of this work more than once, for example in <a href="https://github.com/w3c/resource-timing/issues/260">w3c/resource-timing#260</a>: <cite>Resource Timing</cite> was exposing some of its properties for cross-origin resources, and by specifying it more rigorously we found that some properties that were exposed should actually be hidden.</p>
  94.  
  95.  
  96.  
  97. <h3 class="wp-block-heading">The role of web platform tests</h3>
  98.  
  99.  
  100.  
  101. <p>Of course, writing a few words into a standard doesn't fix interoperability issues or security flaws — it requires the two other pillars, tests and implementations. A big part of this debt-paying work involves adding missing coverage to web platform tests, and posting implementation bugs.</p>
  102.  
  103.  
  104.  
  105. <h3 class="wp-block-heading">Work done so far</h3>
  106.  
  107.  
  108.  
  109. <ul><li>The processing model of <cite><a href="https://w3c.github.io/resource-timing/">Resource Timing</a></cite> has been <a href="https://github.com/whatwg/fetch/pull/1185">incorporated into <cite>Fetch</cite></a>, including many edge cases relating to service workers and network errors.</li><li>The processing model of <cite><a href="https://w3c.github.io/navigation-timing/">Navigation Timing</a></cite> has been <a href="https://github.com/whatwg/html/pull/6536">incorporated into <cite>HTML</cite></a>.</li><li><cite><a href="https://w3c.github.io/page-visibility/">Page Visibility</a></cite> has been <a href="https://github.com/whatwg/html/pull/7238">folded into <cite>HTML</cite></a>.</li><li>The behavior of <code>&lt;link rel=preload&gt;</code> and how preloads are cached is now <a href="https://github.com/whatwg/html/pull/7260">rigorously defined</a>.</li><li><a href="https://github.com/whatwg/html/pull/7339"><code>timeOrigin</code> computation</a> is defined in the <cite>HTML</cite> and <cite><a href="https://github.com/w3c/ServiceWorker/pull/1621">Service Workers</a></cite> specs.</li><li>The <a href="https://github.com/whatwg/html/pull/7166">deadline mechanism</a> of <a href="https://w3c.github.io/requestidlecallback/"><code>requestIdleCallback</code></a> is now clearly defined.</li><li>Patched <a href="https://github.com/w3c/csswg-drafts/pull/6715">multiple CSS specs</a> to define how they fetch resources and report timing.</li><li>Process <a href="https://github.com/whatwg/html/pull/7622"><code>Link</code> headers</a>.</li></ul>
  110.  
  111.  
  112.  
  113. <h3 class="wp-block-heading">Work in progress</h3>
  114.  
  115.  
  116.  
  117. <ul><li>Additional work on <a href="https://github.com/whatwg/html/pull/7691"><code>Link</code> headers</a>.</li><li><a href="https://github.com/whatwg/html/pull/7693">Clearly defining <code>&lt;link rel=prefetch&gt;</code></a> — this is a bit tricky as browsers treat prefetch in different ways.</li><li>Rigorous specification for <a href="https://github.com/w3c/server-timing/pull/87"><cite>Server Timing</cite></a>.</li><li>Define <a href="https://github.com/whatwg/fetch/pull/1411">CSP interaction with preload</a>.</li><li>Specifying fetching <a href="https://github.com/whatwg/html/pull/7655">range requests</a> (for media).</li><li>Finish the <a href="https://github.com/whatwg/html/issues/6542">HTML integration for resource timing</a>, which requires that all reporters of resource timing do so at the appropriate time.</li><li>Specify <a href="https://github.com/whatwg/html/pull/7675">early hint</a> headers.</li><li>Attempt to define the <a href="https://github.com/whatwg/html/issues/6110">memory cache</a>.</li></ul>
  118.  
  119.  
  120.  
  121. <h3 class="wp-block-heading">Retroactive consensus</h3>
  122.  
  123.  
  124.  
  125. <p>Some of the features in question are already shipped, and vendors took liberties to interpret them in different ways. This raises a challenge of achieving <em>retroactive consensus</em>. Vendors might have good reasons to do things differently, but the differences make it difficult for web developers to write interoperable code. In the area of performance APIs, interoperability issues mean that performance measurements or hints might create different results across browsers.</p>
  126.  
  127.  
  128.  
  129. <p>Because the feature is already shipped, achieving consensus retroactively means that browser vendors would have to go back to their implementations and change things, which apart from the work involved could potentially make things suboptimal for some existing cases. Is interoperability worth it? That's a good question and the answer is dynamic.</p>
  130.  
  131.  
  132.  
  133. <p>A current example of this is the attempts to specify <a href="https://github.com/w3c/resource-hints/issues/86">prefetch</a>. It is a relatively old feature that is implemented differently across browsers and those two facts make it difficult to spec after the fact. Another bigger example is the <a href="https://github.com/w3c/navigation-timing/issues/160">discussion about navigation start time being the zero point</a>, which is a cross-origin information leak, but where fixing it would have big implications.</p>
  134.  
  135.  
  136.  
  137. <h3 class="wp-block-heading">What's next</h3>
  138.  
  139.  
  140.  
  141. <p>The technical debt in the fetch/HTML/performance crossroads is a little smaller than before, but still far from being paid. Apart from the in-progress pull requests, some of the remaining debt is tracked <a href="https://github.com/w3c/web-performance/issues/38">here</a>.</p>
  142.  
  143.  
  144.  
  145. <h3 class="wp-block-heading">How you could help</h3>
  146.  
  147.  
  148.  
  149. <p>Apart from the retroactive consensus challenge, an additional challenge is involving more people in the conversation. You can help by reading the issues in progress, forming opinions, finding flaws, posting what you find, proactively becoming involved. If you're not part of the conversation already and are curious, follow the links in this post, read, ask questions, and make suggestions. We'd love to hear from you!</p>
  150.  
  151.  
  152.  
  153. <p></p>
  154. ]]></content:encoded>
  155. </item>
  156. <item>
  157. <title>New Living Standards</title>
  158. <link>https://blog.whatwg.org/new-living-standards-2021</link>
  159. <dc:creator><![CDATA[Domenic Denicola]]></dc:creator>
  160. <pubDate>Wed, 01 Dec 2021 19:25:15 +0000</pubDate>
  161. <category><![CDATA[What's Next]]></category>
  162. <category><![CDATA[WHATWG]]></category>
  163. <guid isPermaLink="false">https://blog.whatwg.org/?p=13071</guid>
  164.  
  165. <description><![CDATA[The last time we introduced a new Living Standard was Infra, in 2016. This year has seen a flurry of activity, with four new standards joining the WHATWG! The Web IDL Standard defines the interface language and JavaScript mapping for all web platform APIs. It migrated to the WHATWG from its old location, on the [&#8230;]]]></description>
  166. <content:encoded><![CDATA[
  167. <p>The last time we introduced a new Living Standard was <a href="https://blog.whatwg.org/infra">Infra, in 2016</a>. This year has seen a flurry of activity, with four new standards joining the WHATWG!</p>
  168.  
  169.  
  170.  
  171. <p>The <strong><a href="https://webidl.spec.whatwg.org/">Web IDL Standard</a></strong> defines the interface language and JavaScript mapping for all web platform APIs. It migrated to the WHATWG from its old location, on the personal GitHub page of its original editor Cameron McCormack. Thanks to Cameron for his many years of stewardship, and thanks to the current editors Edgar Chen and Tiancheng "Timothy" Gu for their help in the move!</p>
  172.  
  173.  
  174.  
  175. <p>The <strong><a href="https://testutils.spec.whatwg.org/">Test Utils Standard</a></strong> defines APIs that are not exposed on the open web by default, but are specifically useful in testing web browser functionality. So far it defines the <code>testUtils.gc()</code> method, allowing us to test garbage collection-dependent APIs. James Graham is the editor.</p>
  176.  
  177.  
  178.  
  179. <p>The <strong><a href="https://websockets.spec.whatwg.org/">WebSockets Standard</a></strong> consolidates content that was formerly spread across the <a href="https://html.spec.whatwg.org/multipage/">HTML Standard</a> and the <a href="https://fetch.spec.whatwg.org/">Fetch Standard</a>. This new home will provide a natural place for standardizing the <a href="https://github.com/ricea/websocketstream-explainer"><code>WebSocketStream</code></a> API, which integrates WebSockets with <a href="https://streams.spec.whatwg.org/">streams</a>. Adam Rice is the editor.</p>
  180.  
  181.  
  182.  
  183. <p>Finally, the <strong><a href="https://github.com/whatwg/sg/issues/176">File System Standard</a></strong> will specify an API for an origin-private filesystem, drawn from <a href="https://wicg.github.io/file-system-access/#sandboxed-filesystem">part of the existing File System Access specification</a> as well as the <a href="https://github.com/WICG/file-system-access/blob/main/AccessHandle.md">AccessHandle proposal</a>. (The portions of the File System API specification for <a href="https://wicg.github.io/file-system-access/#local-filesystem">accessing the local file system</a> will remain in incubation, until they gather multi-implementer interest.) Marijn Kruisselbrink will be the editor.</p>
  184.  
  185.  
  186.  
  187. <p>We're happy to see such excitement about working in the WHATWG, and will strive to continue to provide a welcoming community where new features can be developed or existing incubations can graduate. We hope you enjoy these new Living Standards. As always, feel free to join us on GitHub to discuss improvements and additions. And if there are more specifications that would like to become WHATWG Living Standards, please <a href="https://whatwg.org/chat">get in touch</a>!</p>
  188. ]]></content:encoded>
  189. </item>
  190. <item>
  191. <title>Newline normalizations in form submission</title>
  192. <link>https://blog.whatwg.org/newline-normalizations-in-form-submission</link>
  193. <dc:creator><![CDATA[Andreu Botella]]></dc:creator>
  194. <pubDate>Thu, 27 May 2021 15:05:15 +0000</pubDate>
  195. <category><![CDATA[Browsers]]></category>
  196. <category><![CDATA[Forms]]></category>
  197. <category><![CDATA[WHATWG]]></category>
  198. <guid isPermaLink="false">https://blog.whatwg.org/?p=13027</guid>
  199.  
  200. <description><![CDATA[In form submissions, form values containing newlines get normalized to CRLF. But that newline normalization runs deeper than might be thought. Here is a deep dive on the recent spec changes on that area.]]></description>
  201. <content:encoded><![CDATA[
  202. <p>If you work with form submissions, you might have noticed that form values containing newlines are normalized to CRLF, no matter whether the DOM value had LF or CR instead:</p>
  203.  
  204.  
  205.  
  206. <pre class="wp-block-code"><code>&lt;form action="./post" method="post" enctype="application/x-www-form-urlencoded"&gt;
  207.  &lt;input type="hidden" name="hidden" value="a&amp;#x0D;b&amp;#x0A;c&amp;#x0D;&amp;#x0A;d" /&gt;
  208.  &lt;input type="submit" /&gt;
  209. &lt;/form&gt;
  210.  
  211. &lt;script&gt;
  212.  // Checking that the DOM has the correct newlines and the normalization
  213.  // happens during the form submission.
  214.  const hiddenInput = document.querySelector("input&#91;type=hidden]");
  215.  console.log("%s", JSON.stringify(hiddenInput.value)); // "a\rb\nc\r\nd"
  216. &lt;/script&gt;</code></pre>
  217.  
  218.  
  219.  
  220. <pre class="wp-block-code"><code>hidden=a%0D%0Ab%0D%0Ac%0D%0Ad</code></pre>
  221.  
  222.  
  223.  
  224. <p>But although it might seem simple on the surface, newline normalization in form submissions is a topic that runs deeper than I thought, with bugs in the spec and differences across browsers. This post goes through what the spec used to do, what browsers (used to) implement, and how we went about fixing it.</p>
  225.  
  226.  
  227.  
  228. <h3 class="wp-block-heading" id="form-submission-basics">First, some background on form submission</h3>
  229.  
  230.  
  231.  
  232. <p>The data to submit from a form is modeled as an <a href="https://xhr.spec.whatwg.org/#concept-formdata-entry-list">entry list</a> – entries being pairs of names (strings) and values (either strings or <a href="https://w3c.github.io/FileAPI/#file-section"><code>File</code></a> objects). This is a list rather than a map because a form can have multiple values for each name – which is is how <code>&lt;input type="file" multiple&gt;</code> and <code>&lt;select multiple&gt;</code> work – and their relative order with the rest of form entries matters.</p>
  233.  
  234.  
  235.  
  236. <p>The algorithm that does the job of going through every submittable element associated with a particular form and collecting their corresponding form entries is the <a href="https://html.spec.whatwg.org/commit-snapshots/4cfb2b76873e23e8a8ac762f5ddaa0a6630b3e6e/#constructing-form-data-set">"construct the entry list"</a> algorithm. This algorithm does what you'd expect – discard disabled controls and buttons not pressed, and then for each control it calls the <a href="https://html.spec.whatwg.org/commit-snapshots/4cfb2b76873e23e8a8ac762f5ddaa0a6630b3e6e/#append-an-entry">"append an entry"</a> algorithm, which used to replace any newlines in the entry name and value (if that value is a string) with CRLF before appending the entry.</p>
  237.  
  238.  
  239.  
  240. <p>"Construct the entry list" is called early into the form submission algorithm, and the resulting entry list is then passed to the encoding algorithm for the corresponding enctype. Since only the <code>multipart/form-data</code> enctype supports uploading files, the algorithms for both <code>application/x-www-form-urlencoded</code> and <code>text/plain</code> encode the value's filename instead.</p>
  241.  
  242.  
  243.  
  244. <h3 class="wp-block-heading" id="first-signs-of-trouble">First signs of trouble</h3>
  245.  
  246.  
  247.  
  248. <p>My first foray into the encoding of form payloads was in defining precisely how entry names (and filenames of file entry values) had to be escaped in <code>multipart/form-data</code> payloads, and since LF and CR have to be percent escaped, newlines came up during testing.</p>
  249.  
  250.  
  251.  
  252. <p>One thing I noticed is that, if you have newlines inside a filename – yes, that is something you can do – they're normalized differently than for an entry name or a string value.</p>
  253.  
  254.  
  255.  
  256. <pre class="wp-block-code"><code>&lt;form id="form" action="./post" method="post" enctype="multipart/form-data"&gt;
  257.  &lt;input type="hidden" name="hidden a&amp;#x0D;b" value="a&amp;#x0D;b" /&gt;
  258.  &lt;input id="fileControl" type="file" name="file a&amp;#x0D;b" /&gt;
  259. &lt;/form&gt;
  260.  
  261. &lt;script&gt;
  262.  // A file with filename "a\rb", empty contents, and "application/octet-stream"
  263.  // MIME type.
  264.  const file = new File(&#91;], "a\rb");
  265.  
  266.  const dataTransfer = new DataTransfer();
  267.  dataTransfer.items.add(file);
  268.  document.getElementById("fileControl").files = dataTransfer.files;
  269.  
  270.  document.getElementById("form").submit();
  271. &lt;/script&gt;</code></pre>
  272.  
  273.  
  274.  
  275. <p>Here is the resulting <code>multipart/form-data</code> payload in Chrome and Safari (newlines are always CRLF):</p>
  276.  
  277.  
  278.  
  279. <pre class="wp-block-code"><code>------WebKitFormBoundaryjlUA0jn3NUYxIh2A
  280. Content-Disposition: form-data; name="hidden a%0D%0Ab"
  281.  
  282. a
  283. b
  284. ------WebKitFormBoundaryjlUA0jn3NUYxIh2A
  285. Content-Disposition: form-data; name="file a%0D%0Ab"; filename="a%0Db"
  286. Content-Type: application/octet-stream
  287.  
  288.  
  289. ------WebKitFormBoundaryjlUA0jn3NUYxIh2A--
  290. </code></pre>
  291.  
  292.  
  293.  
  294. <p>And this is in Firefox 88 (the current stable version as of this writing):</p>
  295.  
  296.  
  297.  
  298. <pre class="wp-block-code"><code>-----------------------------26303884030012461673680556885
  299. Content-Disposition: form-data; name="hidden a b"
  300.  
  301. a
  302. b
  303. -----------------------------26303884030012461673680556885
  304. Content-Disposition: form-data; name="file a b"; filename="a b"
  305. Content-Type: application/octet-stream
  306.  
  307.  
  308. -----------------------------26303884030012461673680556885--
  309. </code></pre>
  310.  
  311.  
  312.  
  313. <p>As you can see, Firefox substitutes a space for any newlines (CR, LF or CRLF) in the <code>multipart/form-data</code> encoding of entry names and filenames, rather than percent-encoding them as do Chrome and Safari. This behavior was made illegal in the spec in pull request <a href="https://github.com/whatwg/html/pull/6282">#6282</a>, but it couldn't be fixed in Firefox until the spec decided on a normalization behavior. In the case of values, Firefox normalizes to CRLF as the other browsers do.</p>
  314.  
  315.  
  316.  
  317. <p>As for Chrome and Safari, here we see that newlines in entry names and string values are normalized to CRLF, but filenames are not normalized. From the entry list construction algorithm as described above, this makes sense because entry values are only normalized to CRLF <em>when they are strings</em> – files are unchanged, and so are their filenames.</p>
  318.  
  319.  
  320.  
  321. <p>Except that, if you change the form's enctype in the above example to <code>application/x-www-form-urlencoded</code>, you get this in every browser:</p>
  322.  
  323.  
  324.  
  325. <pre class="wp-block-code"><code>hidden+a%0D%0Ab=a%0D%0Ab&amp;file+a%0D%0Ab=a%0D%0Ab</code></pre>
  326.  
  327.  
  328.  
  329. <p>Since <code>multipart/form-data</code> is the only enctype that allows file uploads, other enctypes use their filenames instead. But here it seems like every browser is CRLF-normalizing the filenames, even though in the spec that substitution happens long after constructing the entry list.</p>
  330.  
  331.  
  332.  
  333. <h3 class="wp-block-heading" id="formdata-and-fetch">Normalizations with <code>FormData</code> and <code>fetch</code></h3>
  334.  
  335.  
  336.  
  337. <p>The <a href="https://xhr.spec.whatwg.org/#interface-formdata"><code>FormData</code></a> class started out as a way to send <code>multipart/form-data</code> form payloads through the <code>XMLHttpRequest</code> and <code>fetch</code> APIs without having to generate that payload in JavaScript. As such, <code>FormData</code> instances are basically a JS-accessible wrapper over an entry list.</p>
  338.  
  339.  
  340.  
  341. <p>So let's try the same with <code>FormData</code>:</p>
  342.  
  343.  
  344.  
  345. <pre class="wp-block-code"><code>const formData = new FormData();
  346. formData.append("hidden a\rb", "a\rb");
  347. formData.append("file a\rb", new File(&#91;], "a\rb"));
  348.  
  349. // FormData objects in fetch will always be serialized as multipart/form-data.
  350. await fetch("./post", { method: "POST", body: formData });</code></pre>
  351.  
  352.  
  353.  
  354. <p>Safari sends the same form payload as above, with names and values normalized to CRLF, and so does Firefox 88 with values normalized to CRLF (and names and values having their newlines escaped as spaces). But Chrome keeps names, filenames and values unnormalized (here the <span style="font-weight: bold">?</span> character stands for CR):</p>
  355.  
  356.  
  357.  
  358. <pre class="wp-block-code"><code>------WebKitFormBoundarySMGkMfD8mVOnmGDP
  359. Content-Disposition: form-data; name="hidden a%0Db"
  360.  
  361. a<span style="font-weight: bold">?</span>b
  362. ------WebKitFormBoundarySMGkMfD8mVOnmGDP
  363. Content-Disposition: form-data; name="file a%0Db"; filename="a%0Db"
  364. Content-Type: application/octet-stream
  365.  
  366.  
  367. ------WebKitFormBoundarySMGkMfD8mVOnmGDP--
  368. </code></pre>
  369.  
  370.  
  371.  
  372. <p>Since <code>FormData</code> is just a wrapper over an entry list, and <code>fetch</code> simply calls the <code>multipart/form-data</code> encoding algorithm, no normalizations should take place. So it looks like Chrome was following the spec here, while Firefox and Safari were apparently doing some newline normalization (for Firefox, on string values only) at the time of serializing as <code>multipart/form-data</code>.</p>
  373.  
  374.  
  375.  
  376. <p>With <code>FormData</code> you can also investigate what the "construct the entry list" algorithm does, since if you pass a <code>&lt;form&gt;</code> element to the <code>FormData</code> constructor, it will call that algorithm outside of a form submission context, and let you inspect the resulting entry list.</p>
  377.  
  378.  
  379.  
  380. <pre class="wp-block-code"><code>&lt;form id="form"&gt;
  381.  &lt;input type="hidden" name="a&amp;#x0D;b" value="a&amp;#x0D;b" /&gt;
  382. &lt;/form&gt;
  383.  
  384. &lt;script&gt;
  385.  const formData = new FormData(document.getElementById("form"));
  386.  for (const &#91;name, value] of formData.entries()) {
  387.    console.log("%s %s", JSON.stringify(name), JSON.stringify(value));
  388.  }
  389.  // Firefox and Safari print: "a\rb" "a\rb"
  390.  // Chrome prints: "a\r\nb" "a\r\nb"
  391.  // These results don't depend on the form's enctype.
  392. &lt;/script&gt;</code></pre>
  393.  
  394.  
  395.  
  396. <p>So it seems like Firefox and Safari are not normalizing as they construct the entry list, and instead normalize names and values at the time that they encode the form into an enctype. In particular, since the <code>application/x-www-form-urlencoded</code> and <code>text/plain</code> enctypes don't allow file uploads, file entry values are substituted with their filenames <em>before</em> the normalization. Entry lists that aren't created from the "construct an entry list" algorithm get normalized all the same.</p>
  397.  
  398.  
  399.  
  400. <p>Chrome instead follows the specification (as it used to be) in normalizing in "construct an entry list" and not normalizing later, even for entry lists created through other means. But that doesn't explain why filenames in the <code>application/x-www-form-urlencoded</code> and <code>text/plain</code> enctypes are normalized. Does Chrome also have an additional normalization layer?</p>
  401.  
  402.  
  403.  
  404. <h3 class="wp-block-heading" id="formdata-event">Investigating late normalization with the <code>formdata</code> event</h3>
  405.  
  406.  
  407.  
  408. <p>It would be great to investigate in more detail what Chrome and other browsers do <em>after</em> constructing the entry list. Since the entry list construction already normalizes entries, any further normalizations that might happen further down the line are obscured in the common case.</p>
  409.  
  410.  
  411.  
  412. <p>In the case of <code>multipart/form-data</code>, we can test this because using a <code>FormData</code> object with <code>fetch</code> doesn't invoke "construct an entry list", and so can see what happens to unnormalized entries. For other enctypes there is no way to create an entry list that doesn't go through "construct an entry list", but as it turns out, the "construct an entry list" algorithm itself offers two ways to end up with unnormalized entries: <a href="https://html.spec.whatwg.org/multipage/custom-elements.html#form-associated-custom-elements">form-associated custom elements</a> (only implemented in Chrome so far) and the <a href="https://html.spec.whatwg.org/multipage/indices.html#event-formdata"><code>formdata</code> event</a> (implemented in Chrome and Firefox). Here we'll only be covering the latter, since their results are equivalent.</p>
  413.  
  414.  
  415.  
  416. <p>One thing I skipped when I covered the "construct an entry list" algorithm above is that, at the end of the algorithm, after all entries corresponding to controls have been added to the entry list, a <code>formdata</code> event is fired on the relevant <code>&lt;form&gt;</code> element. This event has a <code>formData</code> attribute which allows you not only to inspect the entry list at that point, but to modify it.</p>
  417.  
  418.  
  419.  
  420. <pre class="wp-block-code"><code>&lt;form
  421.  id="form"
  422.  action="./post"
  423.  method="post"
  424.  enctype="application/x-www-form-urlencoded"
  425. &gt;
  426.  &lt;!-- Empty --&gt;
  427. &lt;/form&gt;
  428.  
  429. &lt;script&gt;
  430.  const form = document.getElementById("form");
  431.  form.addEventListener("formdata", (evt) =&gt; {
  432.    evt.formData.append("string a\rb", "a\rb");
  433.    evt.formData.append("file a\rb", new File(&#91;], "a\rb"));
  434.  });
  435.  form.submit();
  436. &lt;/script&gt;</code></pre>
  437.  
  438.  
  439.  
  440. <p>For both Chrome and Firefox (not Safari because it doesn't support the <code>formdata</code> event), trying this with the <code>application/x-www-form-urlencoded</code> enctype gets you a normalized result:</p>
  441.  
  442.  
  443.  
  444. <pre class="wp-block-code"><code>string+a%0D%0Ab=a%0D%0Ab&amp;file+a%0D%0Ab=a%0D%0Ab</code></pre>
  445.  
  446.  
  447.  
  448. <p>Firefox shows the same normalizations for the <code>text/plain</code> enctype; Chrome instead normalizes only filenames, not names and values. And with <code>multipart/form-data</code> we get the same result as with <code>fetch</code> and <code>FormData</code> above: Chrome doesn't normalize anything, Firefox normalizes string values (with names and filenames being replaced with spaces).</p>
  449.  
  450.  
  451.  
  452. <p>So in short:</p>
  453.  
  454.  
  455.  
  456. <ul><li>For <code>application/x-www-form-urlencoded</code>, all browsers perform an additional newline normalization at the moment of serializing the form payload, whether or not they normalize when constructing the entry list. Note that newline normalizations are idempotent, so normalizing an already normalized string doesn't change it.</li><li>For <code>text/plain</code>, Firefox and Safari seem to act just like for <code>application/x-www-form-urlencoded</code>. Chrome instead only normalizes filenames, probably at the same time as files are being substituted with their filenames.</li><li>For <code>multipart/form-data</code>, Chrome doesn't normalize anything. Safari instead normalizes names and string values, but not filenames. Firefox does the same as Safari for values, but replaces any newlines in names and filenames with a space.</li></ul>
  457.  
  458.  
  459.  
  460. <p>Remember that these differences across browsers don't really affect the encoding of normal forms, they only matter if you're using <code>FormData</code> with <code>fetch</code>, the <code>formdata</code> event, or form-associated custom elements.</p>
  461.  
  462.  
  463.  
  464. <h3 class="wp-block-heading" id="spec-fixes"><a href="https://gist.github.com/andreubotella/bb62bfe0489baa5fe9a1155e0b37f92d#fixing-the-spec"></a>Fixing the spec</h3>
  465.  
  466.  
  467.  
  468. <p>So which behavior do we choose? Firefox replacing newlines in <code>multipart/form-data</code> names and values with a space is illegal as per <a href="https://github.com/whatwg/html/pull/6282">PR #6282</a>, but anything else is fair game.</p>
  469.  
  470.  
  471.  
  472. <p>For <code>text/plain</code>, we have Firefox and Safari behaving in the same way, and Chrome disagreeing. Since <code>text/plain</code> cannot represent inputs unambiguously, is little used in any case, and you would need either form-associated custom elements or to use the <code>formdata</code> event to see a difference, it seems extremely unlikely that there is web content that depends on either case. So it makes more sense to treat <code>text/plain</code> just like <code>application/x-www-form-urlencoded</code> and normalize names, filenames and values.</p>
  473.  
  474.  
  475.  
  476. <p>For <code>multipart/form-data</code>, there is the added compatibility risk that you can observe this case by using <code>FormData</code> and <code>fetch</code>, so it's more likely to cause webcompat issues, no matter whether we went with Safari's or Chrome's behavior. In the end we choose to go with Safari's, in order to be consistent at normalizing all enctypes – although the <code>multipart/form-data</code> has to be different in not normalizing filenames, of course.</p>
  477.  
  478.  
  479.  
  480. <p>So in pull request <a href="https://github.com/whatwg/html/pull/6287">#6287</a> we fixed this by:</p>
  481.  
  482.  
  483.  
  484. <ol><li>Adding <a href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs">a new algorithm</a> that runs before the <code>application/x-www-form-urlencoded</code> and <code>text/plain</code> serializers. This algorithm first extracts a filename from the entry value, if it's a file, and then CRLF-normalizes both the name and value.</li><li>We changed the <a href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data"><code>multipart/form-data</code> encoding algorithm</a> to have a first step that CRLF-normalizes names and string values, leaving file values intact.</li></ol>
  485.  
  486.  
  487.  
  488. <h3 class="wp-block-heading" id="revisiting-early-normalization"><a href="https://gist.github.com/andreubotella/bb62bfe0489baa5fe9a1155e0b37f92d#do-we-need-the-early-normalization-though"></a>Do we need the early normalization though?</h3>
  489.  
  490.  
  491.  
  492. <p>At the time that we decided the above changes to the spec, I still thought that the spec's (and Chrome's) behavior of normalizing in "construct the entry list" was correct. But later on I realized that, once we have the late normalizations mentioned above, the early normalization in "construct the entry list" doesn't matter for form submission, since the late normalizations do everything the early one can do and more. The only way you could observe whether that early normalization is present or not is through the <code>FormData</code> constructor. So it would make sense to remove that early normalization and standardize on Firefox and Safari's behavior here, as we did in pull request <a href="https://github.com/whatwg/html/pull/6624">#6624</a>.</p>
  493.  
  494.  
  495.  
  496. <p>One kink remained, though: <code>&lt;textarea&gt;</code> elements support the <a href="https://html.spec.whatwg.org/#attr-textarea-wrap"><code>wrap="hard"</code></a> attribute, which adds linebreaks into the submitted value corresponding to how the text is linewrapped in the UI. In the spec, this is done through the <a href="https://html.spec.whatwg.org/commit-snapshots/4cfb2b76873e23e8a8ac762f5ddaa0a6630b3e6e/#textarea-wrapping-transformation">"textarea wrapping transformation"</a>, which takes the textarea's <a href="https://html.spec.whatwg.org/#concept-textarea-raw-value">"raw value"</a>, normalizes it to CRLF, and when <code>wrap="hard"</code>, adds CRLF newlines to wrap the contents. But if you test this on Safari, all newlines (both normalized and added) are LF – and Firefox currently doesn't implement <code>wrap="hard"</code>, but it does normalize newlines to LF. So should this be changed?</p>
  497.  
  498.  
  499.  
  500. <p>I thought it was better to align on Firefox's and Safari's behavior, especially since this could simplify the mess that is the difference between "raw value", "API value" and "value" for <code>&lt;textarea&gt;</code> in the spec. Chrome disagreed at first – <a href="https://github.com/whatwg/html/issues/6647#issuecomment-834168065">but as it turns out</a>, Chrome's implementation of the textarea wrapping transformation normalizes to LF, and it's only the normalization in "construct an entry list" that normalizes those newlines to CRLF. So Chrome would align with Firefox and Safari in that area by just removing the early normalization.</p>
  501.  
  502.  
  503.  
  504. <p>Pull request <a href="https://github.com/whatwg/html/pull/6697">#6697</a> fixes this issue with <code>&lt;textarea&gt;</code> in the spec, and the follow-up issue <a href="https://github.com/whatwg/html/issues/6662">#6662</a> will take care of simplifying the textarea wrapping transformation in the spec, as well as ensure that it matches implementations.</p>
  505.  
  506.  
  507.  
  508. <h3 class="wp-block-heading" id="implementation-fixes"><a href="https://gist.github.com/andreubotella/bb62bfe0489baa5fe9a1155e0b37f92d#implementation-fixes"></a>Implementation fixes</h3>
  509.  
  510.  
  511.  
  512. <p>After those three pull requests, the current spec mandates that no normalization happen in "construct the entry list", and that the entry lists to be encoded with some enctype go through a transformation that depends on the enctype:</p>
  513.  
  514.  
  515.  
  516. <ul><li>For <code>application/x-www-form-urlencoded</code> and <code>text/plain</code>, this transformation first replaces file values with their filenames, and then CRLF-normalizes names and values.</li><li>For <code>multipart/form-data</code>, this transformation CRLF-normalizes names and string values, but not filenames.</li></ul>
  517.  
  518.  
  519.  
  520. <p>Safari implements the current spec behavior, and so doesn't need any fixes as a result of these spec changes. However, when working on them I noticed that Safari had a preexisting bug in that it wasn't converting entry names and string values <a href="https://infra.spec.whatwg.org/#javascript-string-convert">into scalar value strings</a> in the "construct an entry list" algorithm, which could lead to <code>FormData</code> objects containing <code>DOMString</code> values despite the WebIDL declaration. What's more, those lone surrogates would remain there until the time of serializing the form, and might show up in the form payload as <a href="https://simonsapin.github.io/wtf-8">WTF-8</a> surrogate byte sequences. This is <a href="https://bugs.webkit.org/show_bug.cgi?id=225299">bug 225299</a>.</p>
  521.  
  522.  
  523.  
  524. <p>Firefox acts much like Safari, except in that it escapes newlines in <code>multipart/form-data</code> names and filenames as spaces rather than CRLF-normalizing in the case of names and then percent-encoding. With the normalization now defined in the spec, this could now be changed. This is <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1686765">bug 1686765</a>. I additionally also found the same bug as Safari with not converting strings into scalar value strings, except in this case the normalization did take place when encoding (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1709066">bug 1709066</a>). Both issues are now fixed in Firefox Nightly and will ship on Firefox 90.</p>
  525.  
  526.  
  527.  
  528. <p>Finally, Chrome would need to remove the normalization it performs in "construct an entry list", update the normalization it performs on the <code>text/plain</code> enctype to cover not only filenames but also names and values, and add an additional normalization for <code>multipart/form-data</code> names and values. This is covered in <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1167095">issue 1167095</a>. Since Chrome is the browser that needs the most changes as a result of these spec changes, and they are understandably concerned with backwards compatibility, these fixes are expected to ship behind a flag so they can be quickly rolled back in case of trouble.</p>
  529.  
  530.  
  531.  
  532. <h3 class="wp-block-heading" id="conclusion">Conclusion</h3>
  533.  
  534.  
  535.  
  536. <p>Although form submission is not necessarily seen as an easy topic, newline normalization in that context might not seem like such a big deal from the outside. But in a platform like the web, where spec and implementation decisions can easily snowball into compatibility concerns, even things that might look simple might have a history that makes standardizing on one behavior hard.</p>
  537. ]]></content:encoded>
  538. </item>
  539. <item>
  540. <title>Update from the Steering Group</title>
  541. <link>https://blog.whatwg.org/update-from-the-steering-group</link>
  542. <dc:creator><![CDATA[Anne van Kesteren]]></dc:creator>
  543. <pubDate>Thu, 29 Apr 2021 06:41:19 +0000</pubDate>
  544. <category><![CDATA[WHATWG]]></category>
  545. <guid isPermaLink="false">https://blog.whatwg.org/?p=13019</guid>
  546.  
  547. <description><![CDATA[A couple things the Steering Group has been working on recently reached a new milestone and seemed noteworthy enough to highlight to the wider WHATWG community. As you may know the WHATWG formally collaborates with W3C on the DOM and HTML standards. In practice there is also a significant overlap in membership and sharing of [&#8230;]]]></description>
  548. <content:encoded><![CDATA[<p>A couple things the Steering Group has been working on recently reached a new milestone and seemed noteworthy enough to highlight to the wider WHATWG community.</p>
  549.  
  550. <p>As you may know the WHATWG formally collaborates with W3C on the DOM and HTML standards. In practice there is also a significant overlap in membership and sharing of ideas. We recently reached a new milestone in this endeavor as <a href="https://www.w3.org/blog/2021/01/whatwg-review-drafts-of-html-and-dom-endorsed-as-w3c-recommendations/">W3C has marked Review Drafts of the DOM and HTML standards as W3C Recommendations</a>. We’d like to take this opportunity to thank the W3C community for their cooperation on these important web standards.</p>
  551.  
  552. <p>In response to community feedback we clarified “work in the field of web technologies” in the <a href="https://participate.whatwg.org/agreement">Contributor and Workstream Participant Agreement</a>. And while for the most part Individuals and Entities alike have had no trouble signing up and contributing en masse to the WHATWG, we added the possibility for individuals to be invited. This has some similarities to W3C’s Invited Expert program and will be used for a select few cases where this might be worthwhile.</p>
  553.  
  554. <p>Finally, to make it easier to embed code from our standards into software, the <a href="https://opensource.org/licenses/BSD-3-Clause">BSD 3-Clause license</a> can now be used for that purpose as stipulated in the <a href="https://whatwg.org/ipr-policy">IPR Policy</a>.</p>
  555.  
  556. <p>Thanks to everyone for their continued feedback on these matters over the years!</p>]]></content:encoded>
  557. </item>
  558. <item>
  559. <title>Considering accessibility</title>
  560. <link>https://blog.whatwg.org/considering-accessibility</link>
  561. <dc:creator><![CDATA[Carolyn MacLeod]]></dc:creator>
  562. <pubDate>Tue, 21 Jan 2020 21:00:00 +0000</pubDate>
  563. <category><![CDATA[Elements]]></category>
  564. <category><![CDATA[accessibility]]></category>
  565. <category><![CDATA[aria]]></category>
  566. <guid isPermaLink="false">https://blog.whatwg.org/?p=12994</guid>
  567.  
  568. <description><![CDATA[Sometimes, new authors need a gentle reminder to think about accessibility when designing and writing web pages and apps. Experienced authors need a quick way to look up the allowed ARIA roles, states and properties for each HTML element. Browser and Assistive Technology (AT) implementers need quick access from an HTML element to its platform [&#8230;]]]></description>
  569. <content:encoded><![CDATA[<p>Sometimes, new authors need a gentle reminder to think about accessibility when designing and writing web pages and apps. Experienced authors need a quick way to look up the <a href="https://w3c.github.io/html-aria/#allowed-aria-roles-states-and-properties">allowed ARIA roles, states and properties</a> for each HTML element. Browser and Assistive Technology (AT) implementers need quick access from an HTML element to its <a href="https://w3c.github.io/html-aam/#dfn-accessibility-api">platform accessibility API</a>.</p>
  570.  
  571. <p>For a look at how these needs translated into the new <a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-accessibility-considerations">Accessibility considerations</a> section for each element, please see "<a href="https://www.24a11y.com/2019/pouring-aria-into-the-html-element-specs/">POURing ARIA into the HTML element specs</a>" over at <a href="https://www.24a11y.com/">24 Accessibility</a>.</p>]]></content:encoded>
  572. </item>
  573. <item>
  574. <title>Focusing on focus</title>
  575. <link>https://blog.whatwg.org/focusing-on-focus</link>
  576. <comments>https://blog.whatwg.org/focusing-on-focus#comments</comments>
  577. <dc:creator><![CDATA[Rakina Zata Amni]]></dc:creator>
  578. <pubDate>Wed, 16 Oct 2019 08:09:26 +0000</pubDate>
  579. <category><![CDATA[Browser API]]></category>
  580. <category><![CDATA[DOM]]></category>
  581. <category><![CDATA[Forms]]></category>
  582. <category><![CDATA[Processing Model]]></category>
  583. <guid isPermaLink="false">https://blog.whatwg.org/?p=12969</guid>
  584.  
  585. <description><![CDATA[Focus behavior in HTML had been under-specified for the past few years, and it was also quite confusing due to a variety of subtle differences between focusing methods, UA-specific behaviors, relation to the tabindex attribute, relations to shadow DOM, etc. A few months ago Domenic filed a meta-bug that contains a list of things to [&#8230;]]]></description>
  586. <content:encoded><![CDATA[<p>Focus behavior in HTML had been under-specified for the past few years, and it was also quite confusing due to a variety of subtle differences between focusing methods, UA-specific behaviors, relation to the <code>tabindex</code> attribute, relations to shadow DOM, etc.</p>
  587.  
  588. <p>A few months ago Domenic filed a <a href="https://github.com/whatwg/html/issues/4607">meta-bug</a> that contains a list of things to fix so that we would have a good foundation for further additions to focus-related stuff, and to hopefully make focus in HTML make sense to browser engineers and web authors!</p>
  589.  
  590. <h3>Types of focus</h3>
  591.  
  592. <p>You may know that you can focus on stuff by clicking on them, tabbing, or calling <code>focus()</code> on it — but did you know that things might be focusable with one method but not with others? Domenic and Mu-An made <a href="https://boom-bath.glitch.me/tabindex.html">a giant interactive list of HTML elements</a> to showcase how they react to different methods of focusing, and can be tested from various browsers to show the difference between them.</p>
  593.  
  594. <p>To reflect the varying behaviors of focus in various UAs in the spec, we classified focusability into three types: “programmatically focusable”, “click focusable”, and “sequentially focusable”.</p>
  595.  
  596. <p>If an element is <strong><a href="https://html.spec.whatwg.org/multipage/interaction.html#focusable">programmatically focusable</a></strong>, it will get focused when calling the <code>focus()</code> method on it or when putting an <code>autofocus</code> attribute on the element. In all platforms, all elements that are either click focusable or sequentially focusable are also programmatically focusable, so “programmatically focusable” is interchangeable with “focusable”.</p>
  597.  
  598. <p>If an element is <strong><a href="https://html.spec.whatwg.org/multipage/interaction.html#click-focusable">click focusable</a></strong>, the element will get focused when it’s clicked. This has the same set of elements as “programmatically focusable” in most UAs/platforms. A notable exception is Safari where non-editable form controls (checkboxes, etc.) are not click focusable by default.</p>
  599.  
  600. <p>If an element is <strong><a href="https://html.spec.whatwg.org/multipage/interaction.html#sequentially-focusable">sequentially focusable</a></strong>, the element can be focused through “tabbing” — in most UAs this means pressing <kbd>Tab</kbd>/<kbd>Shift+Tab</kbd> (and in Safari, <kbd>Option+Tab</kbd> too!).</p>
  601.  
  602. <p>Previously the spec didn’t clearly differentiate “programmatically focusable” and “sequentially focusable”, didn’t even mention “click focusable”, and used the “tabindex focus flag” concept which was slightly confusing due to its relations with the tabindex attribute. So we updated it in <a href="https://github.com/whatwg/html/pull/4768">this PR</a>.</p>
  603.  
  604. <h3><code>tabindex</code></h3>
  605.  
  606. <p>As you may know already, built-in elements like <code>&lt;button&gt;</code>, <code>&lt;input&gt;</code>, <code>&lt;a&gt;</code>, etc. all have a “default” focus behavior — they are focusable (or not) by default. When the <a href="https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex"><code>tabIndex</code> property getter</a> is run on an element whose <code>tabindex</code> attribute is not explicitly set already, it will return 0 sometimes and -1 other times. Previously, the spec said to return 0 if the element is “focusable” by default (which type of focusable?), and -1 otherwise. But <a href="https://github.com/whatwg/html/issues/1786">this wasn’t implemented anywhere</a>, because of possible differences in which elements are focusable by default in various UAs. So now the spec actually checks if the tag name is one of the tag names included in a pre-defined list. This is quite awkward, but at least it’s interoperable! (PR is <a href="https://github.com/whatwg/html/pull/4754">here</a>.)</p>
  607.  
  608. <p>Now, what is the use of <code><a href="https://html.spec.whatwg.org/multipage/interaction.html#attr-tabindex">tabindex</a></code> exactly? You can make an element focusable by setting its <code>tabindex</code> attribute to an integer. This will set the <a href="https://html.spec.whatwg.org/multipage/interaction.html#tabindex-value">tabindex value</a>, and thus impact the focusability of the element. If the integer is non-negative, the element is also sequentially focusable. You can’t, however, make an element not focusable at all through this attribute — there is no value you can set the tabindex attribute to on a <code>&lt;button&gt;</code> that will stop it from being focusable.</p>
  609.  
  610. <p>You can also modify the order of elements traversed with sequential navigation/tabbing — elements with a positive tabindex value will be traversed first, in ascending order (and in tree order in case of a tie), and then elements with a tabindex value of zero (or unspecified but the element is sequentially focusable by default), in tree order.</p>
  611.  
  612. <h3><code>autofocus</code></h3>
  613.  
  614. <p>The <code>autofocus</code> content attribute is useful if you want to set focus on a form control element on page load. However, it had some issues such as:</p>
  615.  
  616. <ul>
  617. <li>The <code>autofocus</code> attribute was available only for some form control elements, and unavailable for other focusable elements like <code>&lt;summary&gt;</code>, <code>&lt;div contenteditable="true"&gt;</code>, and <code>&lt;span tabindex="0"&gt;</code>.</li>
  618. <li>The behavior with an autofocused element in a page accessed with a fragment identifier (e.g. https://example.com/#foo) was not interoperable.</li>
  619. <li>What should happen if there are multiple autofocused elements, and one of them is not focusable?</li>
  620. </ul>
  621.  
  622. <p>The HTML specification and the SVG specification were updated to resolve these issues by changes <a href="https://github.com/whatwg/html/pull/4763">1</a>, <a href="https://github.com/whatwg/html/pull/4830">2</a>, and <a href="https://github.com/w3c/svgwg/pull/728">3</a>. Now the <code>autofocus</code> content attribute and the <code>autofocus</code> IDL attribute are available on all HTML and SVG elements. The <code>autofocus</code> content attribute is not processed if its document has a fragment identifier, or has a focused element. If an autofocus element is not focusable, the element is skipped and another autofocus element is handled.</p>
  623.  
  624. <h3>Shadow DOM and <code>delegatesFocus</code></h3>
  625.  
  626. <p>All of the previously mentioned concepts were already specced in the HTML spec in some way, albeit a bit unclear, not reflecting the actual behavior, etc. Focus behavior with shadow DOM, though, <a href="https://github.com/whatwg/html/issues/2013">had not been upstreamed</a> from the old <a href="https://w3c.github.io/webcomponents/spec/shadow/#focus">Shadow DOM spec</a> at all, so this part of the effort took the most time overall. Since some parts of the Shadow DOM spec on focus were unclear and needed more explanation, we also took a look at how it’s implemented in Blink to get the exact behavior down, and discussed with other browser vendors and web developers on whether we want to keep the implemented behavior or not in some cases.</p>
  627.  
  628. <p>Sequential focus navigation got some significant additions (<a href="https://github.com/web-platform-tests/wpt/pull/17523">PR</a>) with Shadow DOM. We now have a concept of <a href="https://html.spec.whatwg.org/multipage/interaction.html#tabindex-ordered-focus-navigation-scope">“tabindex-ordered focus navigation scope”</a>, <a href="https://html.spec.whatwg.org/multipage/interaction.html#focus-navigation-scope-owner">“focus navigation scope owners”</a>, etc. Essentially, elements are put in different <a href="https://html.spec.whatwg.org/multipage/interaction.html#focus-navigation-scope">focus navigation scopes</a>, where those that belong to the same shadow tree/root, or are slotted to the same slot, are put in the same focus navigation scope. The tabindex order explained earlier now only applies to elements in the same scope, and then finally we <a href="https://html.spec.whatwg.org/multipage/interaction.html#flattened-tabindex-ordered-focus-navigation-scope">flatten</a> all of the scopes to get the final <a href="https://html.spec.whatwg.org/multipage/interaction.html#sequential-focus-navigation-order">sequential focus navigation order</a>.</p>
  629.  
  630. <p>A new concept added (PR <a href="https://github.com/whatwg/html/pull/4796">1</a>, <a href="https://github.com/whatwg/dom/pull/768">2</a>) by Shadow DOM is <a href="https://dom.spec.whatwg.org/#shadowroot-delegates-focus">“delegates focus”</a>, which is used when you want attempts to focus on a shadow host to not focus on the host itself, and instead <a href="https://html.spec.whatwg.org/#focusing-steps">delegate the focus</a> to within the shadow tree (like <code>&lt;input type="date"&gt;</code>!). In Blink, this delegation uses the sequential focus navigation order, but we think it is a bit weird and started a <a href="https://github.com/w3c/webcomponents/issues/830">discussion</a> on how this should actually work — finally <a href="https://github.com/whatwg/html/pull/4796">changing</a> the delegation to respect the protocol of whatever the focusing method is originally used. (That is, use sequential order if we used tabbing, otherwise use flat-tree order and respect click focusability if needed.)</p>
  631.  
  632. <p>We also added the <a href="https://html.spec.whatwg.org/multipage/interaction.html#dom-documentorshadowroot-activeelement"><code>DocumentOrShadowRoot</code>’s <code>activeElement</code> property</a> (<a href="https://github.com/whatwg/html/pull/4837">PR</a>). And we updated the <a href="https://html.spec.whatwg.org/#selector-focus"><code>:focus</code> selector</a> (<a href="https://github.com/whatwg/html/pull/4731">PR</a>), which will now match on shadow hosts if the focused element is a shadow-including inclusive descendant of it. (This is actually different than the behavior in Blink, and is a result of <a href="https://www.w3.org/2019/09/17-components-minutes.html#item02">discussion in TPAC</a> — where we also discussed “delegates focus”.)</p>
  633.  
  634. <h3>The future, and outro</h3>
  635.  
  636. <p>Now that we have a good-enough spec for focus, we have a good foundation for future additions to focus. One new relevant proposal is <a href="https://github.com/w3c/webcomponents/blob/gh-pages/proposals/custom-element-default-focus.md">“custom element default focusability”</a>. As we’ve mentioned, built-in elements have a “default” focus behavior — even though they don’t have a tabindex value explicitly, they are still focusable (or not). When you’re making custom elements, though, currently there is no way to make them focusable by default, without setting the tabindex attribute. The proposal listed various ways this might be solved, and it was <a href="https://www.w3.org/2019/09/17-components-minutes.html#item07">talked about in TPAC</a> with a relatively positive response from various parties. Do check it out if you’re interested!</p>
  637.  
  638. <p>In summary, focus was and is still quite complex to understand. But, at least now there’s a clear source of truth for it, and the browser vendors are working to make it interoperable — implementing new changes to the spec as soon as they can. There are still <a href="https://github.com/whatwg/html/issues?q=is%3Aopen+is%3Aissue+label%3A%22topic%3A+focus%22">lots of focus-related things that need to be specced</a> (we’ve heard people mention <code>focusin</code>/<code>focusout</code>, more CSS selectors, etc.), so if you’re intrigued by this post, know that you can also contribute to fix more things like these!</p>
  639.  
  640. <p>Having an old and mostly confusing focus spec, different types of focus, and multiple uses for <code>tabindex</code> made things quite complicated when starting out. However, one of the trickiest parts of focus, in my opinion, is the fact that what is focusable/click focusable/sequentially focusable might differ in different UAs, and it might be dynamic as well! (E.g. in Safari what’s sequentially focusable changes if you hold down the <kbd>Option</kbd> key!) This means we need to make sure the spec is written to allow for differences, but is still, um, specific enough to make things not too ambiguous.</p>
  641.  
  642. <p>Overall, we’re happy with the result of this effort. We’d like to thank all the parties involved that participated in various ways: experimenting, reviewing spec PRs, implementing the changes, commenting/participating in discussions, etc. Special thanks to <a href="https://github.com/tkent-google">Kent Tamura</a> (who wrote some parts of this post and did the <code>autofocus</code> specs) and <a href="https://github.com/domenic">Domenic Denicola</a> (who kickstarted this whole effort, reviewed all the PRs, and suggested + reviewed this post).</p>
  643.  
  644. <p>Now we can focus on other parts of HTML Standard...</p>]]></content:encoded>
  645. <wfw:commentRss>https://blog.whatwg.org/focusing-on-focus/feed</wfw:commentRss>
  646. <slash:comments>2</slash:comments>
  647. </item>
  648. <item>
  649. <title>The state of fieldset interoperability</title>
  650. <link>https://blog.whatwg.org/the-state-of-fieldset-interoperability</link>
  651. <comments>https://blog.whatwg.org/the-state-of-fieldset-interoperability#comments</comments>
  652. <dc:creator><![CDATA[Simon Pieters]]></dc:creator>
  653. <pubDate>Wed, 19 Sep 2018 14:00:36 +0000</pubDate>
  654. <category><![CDATA[Browsers]]></category>
  655. <category><![CDATA[Forms]]></category>
  656. <category><![CDATA[WHATWG]]></category>
  657. <guid isPermaLink="false">https://blog.whatwg.org/?p=12947</guid>
  658.  
  659. <description><![CDATA[As part of my work at Bocoup, I recently started working with browser implementers to improve the state of fieldset, the 21 year old feature in HTML, that provides form accessibility benefits to assistive technologies like screen readers. It suffers from a number of interoperability bugs that make it difficult for web developers to use. [&#8230;]]]></description>
  660. <content:encoded><![CDATA[<p>As part of my work at <a href="https://bocoup.com/">Bocoup</a>, I recently started <a href="https://bocoup.com/work/fieldset-interoperability">working with browser implementers to improve the state of <code>fieldset</code></a>, the 21 year old feature in HTML, that provides form accessibility benefits to assistive technologies like screen readers. It suffers from a number of interoperability bugs that make it difficult for web developers to use.</p>
  661.  
  662. <p>Here is an example form grouped with a <code>&lt;legend></code> caption in a <code>&lt;fieldset></code> element:</p>
  663.  
  664. <fieldset style="margin-bottom: 1em">
  665. <legend>Pronouns</legend>
  666. <label><input type=radio name=pronouns value=he /> He/him</label>
  667. <label><input type=radio name=pronouns value=she /> She/her</label>
  668. <label><input type=radio name=pronouns value=they /> They/them</label>
  669. <label><input type=radio name=pronouns value=other /> Write your own</label>
  670. <input type=text name=pronouns-other placeholder=&hellip; />
  671. </fieldset>
  672.  
  673. <p>And the <a href="http://software.hixie.ch/utilities/js/live-dom-viewer/saved/6183">corresponding markup</a> for the above example.</p>
  674.  
  675. <pre><code>&lt;fieldset>
  676. &lt;legend>Pronouns&lt;/legend>
  677. &lt;label>&lt;input type=radio name=pronouns value=he> He/him&lt;/label>
  678. &lt;label>&lt;input type=radio name=pronouns value=she> She/her&lt;/label>
  679. &lt;label>&lt;input type=radio name=pronouns value=they> They/them&lt;/label>
  680. &lt;label>&lt;input type=radio name=pronouns value=other> Write your own&lt;/label>
  681. &lt;input type=text name=pronouns-other placeholder=&amp;hellip;>
  682. &lt;/fieldset></code></pre>
  683.  
  684. <p>The element is defined <a href="https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element">in the HTML standard</a>, along with <a href="https://html.spec.whatwg.org/multipage/rendering.html#the-fieldset-and-legend-elements">rendering rules in the Rendering section</a>. Further developer documentation is available on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset">MDN</a>.</p>
  685.  
  686.  
  687. <h3>Usage</h3>
  688.  
  689. <p>Based on a query of the <a href="https://httparchive.org/">HTTP Archive</a> data set, containing the raw content of the top 1.3 million web pages, we find <a href="https://discuss.httparchive.org/t/use-of-html-elements/1438">the relative usage of each HTML element</a>. The <code>fieldset</code> element is used on 8.41% of the web pages, which is higher than other popular features, such as the <code>video</code> and <code>canvas</code> elements; however, the <code>legend</code> element is used on 2.46% of web pages, which is not ideal for assistive technologies. Meanwhile, the <code>form</code> element appears on 70.55% of pages, and we believe that if interoperability bugs were fixed, correct and semantic <code>fieldset</code> and <code>legend</code> use would increase, and have a positive impact on form accessibility for the web.</p>
  690.  
  691.  
  692. <h3>Fieldset standards history</h3>
  693.  
  694. <p>In January 1997, HTML 3.2 introduces forms and some form controls, but does not include the <code>fieldset</code> or <code>legend</code> elements.</p>
  695.  
  696. <p>In July 1997, the first draft of <a href="https://www.w3.org/TR/WD-html40-970708/interact/forms.html#h-9.1.2.6">HTML 4.0 introduces the <code>fieldset</code> and <code>legend</code> elements</a>:</p>
  697.  
  698. <blockquote>
  699. <p>The FIELDSET element allows form designers to group thematically
  700. related controls together. Grouping controls makes it easier for users
  701. to understand their purpose while simultaneously facilitating tabbing
  702. navigation for visual user agents and speech navigation for
  703. speech-oriented user agents. The proper use of this element makes
  704. documents more accessible to people with disabilities.</p>
  705.  
  706. <p>The LEGEND element allows designers to assign a caption to a FIELDSET.
  707. The legend improves accessibility when the FIELDSET is rendered
  708. non-visually. When rendered visually, setting the align attribute on
  709. the LEGEND element aligns it with respect to the FIELDSET.</p>
  710. </blockquote>
  711.  
  712. <p>In December 1999, HTML 4.01 is published as a W3C Recommendation, without changing the definitions of the <code>fieldset</code> and <code>legend</code> elements.</p>
  713.  
  714. <p>In December 2003, Ian Hickson extends the <code>fieldset</code> element with the <code>disabled</code> and <code>form</code> attributes in the <a href="http://www.hixie.ch/specs/html/forms/xforms-basic-1">Proposed XHTML Module: XForms Basic</a>, later renamed to <a href="https://whatwg.org/specs/web-forms/current-work/">Web Forms 2.0</a>.</p>
  715.  
  716. <p>In September 2008, <a href="https://github.com/whatwg/html/commit/62a6f3ee9bf8b6b5ecccb97b60fa949d482174e1">Ian Hickson adds the <code>fieldset</code> element to the HTML standard</a>.</p>
  717.  
  718. <p>In February 2009, Ian Hickson specifies <a href="https://github.com/whatwg/html/commit/a72aed9e5e86eaed0cc5565934ec3c2ad4ff45ef">rendering rules for the <code>fieldset</code> element</a>. The specification has since gone through some minor revisions, e.g., specifying that <a href="https://github.com/whatwg/html/commit/a7ca0499684fea1bbd3d969fd3577d7142da9a49"><code>fieldset</code> establishes a block formatting context</a> in 2009 and <a href="https://github.com/whatwg/html/commit/997399b86db6abfe98918ab9bb134ffd4f28ff56">adding <code>min-width: min-content;</code></a> in 2014.</p>
  719.  
  720. <p>In August 2018, I <a href="https://github.com/whatwg/html/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3A%22topic%3A+fieldset%22+author%3Azcorpan">proposed a number of changes</a> to the standard to better define how it should work, and resolve ambiguity between browser implementer interpretations.</p>
  721.  
  722.  
  723. <h3>Current state</h3>
  724.  
  725. <p>As part of our work at Bocoup to improve the interoperability of the <code>fieldset</code> and <code>legend</code> child element, we talked to web developers and browser implementers, proposed changes to the standard, and <a href="https://github.com/web-platform-tests/wpt/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3Ahtml-fieldset">wrote a lot of tests</a>. At the time of this writing, <a href="https://github.com/whatwg/html/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22topic%3A+fieldset%22">26 issues</a> have been reported on the HTML specification for the <code>fieldset</code> element, and the <a href="https://wpt.fyi/interop/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements">tests that we wrote show a clear lack of interoperability</a> among browser engines.</p>
  726.  
  727. <p><a href="https://wpt.fyi/interop/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements"><img decoding="async" style="max-width:100%" alt="The results for fieldset and legend tests show some tests failing in all browsers, some tests passing in all browsers, and some passing and failing in different browsers." src="https://user-images.githubusercontent.com/244772/45701083-45e70500-bb3c-11e8-8859-7f55adfa27a1.png" srcset="https://user-images.githubusercontent.com/244772/45701083-45e70500-bb3c-11e8-8859-7f55adfa27a1.png 2x"/></a></p>
  728.  
  729. <p>Of the 26 issues filed against the specification, <a href="https://github.com/whatwg/html/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22topic%3A+fieldset%22+label%3A%22topic%3A+rendering%22">17 are about rendering interoperability</a>. These rendering issues affect use cases such as <a href="http://software.hixie.ch/utilities/js/live-dom-viewer/saved/6164">making a <code>fieldset</code> scrollable</a>, which currently result in broken scroll-rendering in some browsers. These issues also affect consistent <code>legend</code> rendering which is causing web developers <a href="https://twitter.com/fvsch/status/1022371862674911232">avoid using the <code>fieldset</code> element</a> altogether. Since the <code>fieldset</code> element is intended to help people who use assistive technologies to navigate forms, the current situation is less than ideal.</p>
  730.  
  731.  
  732. <h4>HTML spec rendering issues</h4>
  733.  
  734. <p>In April of this year, Mozilla developers filed a meta-issue on the HTML specification “<a href="https://github.com/whatwg/html/issues/3660">Need to spec fieldset layout</a>” to address the ambiguities which have been leading to interoperability issues between browser implementations. During the past few weeks of work on <code>fieldset</code>, we made initial <a href="https://github.com/whatwg/html/pull/3934">proposed changes</a> to the rendering section of the HTML standard to address these 17 issues. At the time of this writing, these changes are under review.</p>
  735.  
  736.  
  737. <h4>Proposal to extend -webkit-appearance</h4>
  738.  
  739. <p>Web developers also struggle with changing the default behaviors of <code>fieldset</code> and <code>legend</code> and seek ways to <a href="https://twitter.com/etportis/status/1022250278685356032">turn off the “magic”</a> to have the elements render as normal elements. To address this, we created a <a href="https://github.com/whatwg/html/pull/4035">proposal</a> to extend the <code>-webkit-appearance</code> CSS property with a new value called <code>fieldset</code> and a new property called <code>legend</code> that are together capable giving grouped rendering behavior to regular elements, as well as resetting <code>fieldset</code>/<code>legend</code> elements to behave like normal elements.</p>
  740.  
  741. <pre><code>fieldset {
  742.  -webkit-appearance: none;
  743.  margin: 0;
  744.  padding: 0;
  745.  border: none;
  746.  min-inline-size: 0;
  747. }
  748. legend {
  749.  legend: none;
  750.  padding: 0;
  751. }</code></pre>
  752.  
  753. <p>The general purpose proposed specification for an "unprefixed" <a href="https://www.w3.org/TR/2017/WD-css-ui-4-20171222/#appearance-switching">CSS ‘appearance’ property</a>, has been blocked by <a href="https://groups.google.com/forum/#!msg/mozilla.dev.platform/Fq6OH5SWeRo/lxHDXFnwCQAJ">Mozilla's statement</a> that it is not web-compatible as currently defined, meaning that implementing <code>appearance</code> would break the existing behavior of websites that are currently using CSS <code>appearance</code> in a different way.</p>
  754.  
  755. <p>We <a href="https://github.com/w3c/csswg-drafts/issues/3094">asked the W3C CSS working group for feedback</a> on the above approach, and they had some reservations and will develop an alternative proposal. When there is consensus for how it should work, we will update the specification and tests accordingly.</p>
  756.  
  757. <p>We had also considered defining new <code>display</code> values for <code>fieldset</code> and <code>legend</code>, but care needs to be taken to preserve web compatibility. There are thousands of pages in HTTP Archive that set ‘display’ to something on <a href="https://gist.github.com/zcorpan/711d7f7c199db74a0994f55da7935660"><code>fieldset</code></a> or <a href="https://gist.github.com/zcorpan/2f590536cf64c1aaabbc70f63dbfe2b5"><code>legend</code></a>, but browsers typically <a href="https://github.com/whatwg/html/issues/3915">behave as <code>display: block</code></a> was set. For example, specifying <code>display: inline</code> on the legend needs to render the same as it does by default.</p>
  758.  
  759. <p>In parallel, we authored an <a href="https://github.com/whatwg/compat/pull/104">initial specification for the ‘-webkit-appearance’ property</a> in <a href="https://miketaylr.com/">Mike Taylor</a>'s WHATWG Compatibility standard (which reverse engineers web platform wonk into status quo specifications), along with <a href="https://github.com/web-platform-tests/wpt/pull/12700">accompanying tests</a>. More work needs to be done for the ‘-webkit-appearance’ (or unprefixed ‘appearance’) to define what the values mean and to reach interoperability on the supported values.</p>
  760.  
  761.  
  762. <h4>Accessibility Issues</h4>
  763.  
  764. <p>We have started looking into <a href="https://github.com/web-platform-tests/wpt/pull/12691">testing accessibility</a> explicitly, to ensure that the elements remain accessible even when they are styled in particular ways.</p>
  765.  
  766. <p>This work has uncovered <a href="https://github.com/w3c/html-aam/issues/145">ambiguities in the specification</a>, which we have submitted a <a href="https://github.com/w3c/html-aam/pull/146">proposal</a> to address. We have also identified interoperability issues in the accessiblity mapping in implementations, which we <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1488042">have</a> <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/18874640/">reported</a>.</p>
  767.  
  768.  
  769. <h3>Implementation fixes</h3>
  770.  
  771. <p>Meta bugs have been reported for each browser engine (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1483781">Gecko</a>, <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=874753">Chromium</a>, <a href="https://bugs.webkit.org/show_bug.cgi?id=188643">WebKit</a>, <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/18693151/">EdgeHTML</a>), which depend on more specific bugs.</p>
  772.  
  773. <p>As of September 18 2018, the following issues have been fixed in Gecko:</p>
  774.  
  775. <ul>
  776. <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1483527">Change <code>fieldset</code>’s default padding to match other browsers</a></li>
  777. <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1483499"><code>&lt;legend></code> not child of <code>&lt;fieldset></code> should have 2px padding</a></li>
  778. <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1279185">interaction in between border-image, <code>fieldset</code> and <code>legend</code></a></li>
  779. <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1488301"><code>&lt;legend></code> auto inline margins doesn't work correctly</a></li>
  780. </ul>
  781.  
  782. <p>In Gecko, the bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1483787">Implement <code>fieldset</code>/<code>legend</code> in terms of '-webkit-appearance'</a> currently has a work-in-progress patch.</p>
  783.  
  784. <p>The following issues have been fixes in Chromium:</p>
  785.  
  786. <ul>
  787. <li><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=874053"><code>fieldset</code> should have min-inline-size instead of min-width in UA stylesheet</a></li>
  788. <li><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=476234">The field set border is broken with <code>&lt;legend></code> in vertical layout</a></li>
  789. </ul>
  790.  
  791. <p>The WebKit and Edge teams are aware of bugs, and we will follow up with them to track progress.</p>
  792.  
  793.  
  794. <h3>Conclusion</h3>
  795.  
  796. <p>The <code>fieldset</code> and <code>legend</code> elements are useful to group related form controls, in particular to aid people who use assistive technologies. They are currently not interoperable and are difficult for web developers to style. With our work and proposal, we aim to resolve the problems so that they can be used without restrictions and behave the same in all browser engines, which will benefit browser implementers, web developers, and end users.</p>
  797.  
  798. <p>(This post is cross-posted on <a href="https://bocoup.com/blog/the-state-of-fieldset-interoperability">Bocoup's blog</a>.)</p>]]></content:encoded>
  799. <wfw:commentRss>https://blog.whatwg.org/the-state-of-fieldset-interoperability/feed</wfw:commentRss>
  800. <slash:comments>1</slash:comments>
  801. </item>
  802. <item>
  803. <title>First set of Review Drafts published</title>
  804. <link>https://blog.whatwg.org/first-review-drafts</link>
  805. <dc:creator><![CDATA[Domenic Denicola]]></dc:creator>
  806. <pubDate>Thu, 21 Jun 2018 16:59:32 +0000</pubDate>
  807. <category><![CDATA[WHATWG]]></category>
  808. <guid isPermaLink="false">https://blog.whatwg.org/?p=12943</guid>
  809.  
  810. <description><![CDATA[(If you’re interested in the IPR status of WHATWG standards this post is for you; otherwise, feel free to skip.) One aspect of last year's working mode changes is the periodic publication of a Review Draft for each WHATWG Living Standard, as per the IPR Policy. The WHATWG published an initial five of these just [&#8230;]]]></description>
  811. <content:encoded><![CDATA[<p>(If you’re interested in the IPR status of WHATWG standards this post is for you; otherwise, feel free to skip.)</p>
  812.  
  813. <p>One aspect of last year's <a href="https://blog.whatwg.org/working-mode-changes">working mode changes</a> is the periodic publication of a Review Draft for each WHATWG Living Standard, as per the <a href="https://whatwg.org/ipr-policy">IPR Policy</a>. The WHATWG published an initial five of these just now:</p>
  814.  
  815. <ul>
  816. <li><a href="https://compat.spec.whatwg.org/review-drafts/2018-06/">Compatibility</a></li>
  817. <li><a href="https://console.spec.whatwg.org/review-drafts/2018-06/">Console</a></li>
  818. <li><a href="https://dom.spec.whatwg.org/review-drafts/2018-06/">DOM</a></li>
  819. <li><a href="https://encoding.spec.whatwg.org/review-drafts/2018-06/">Encoding</a></li>
  820. <li><a href="https://fetch.spec.whatwg.org/review-drafts/2018-06/">Fetch</a></li>
  821. </ul>
  822.  
  823. <p>To get notified of future Review Draft publications you need to <a href="https://help.github.com/articles/watching-and-unwatching-repositories/">watch</a> the Living Standard’s corresponding GitHub repository. You’ll find these repositories linked from the top of the standard.</p>
  824.  
  825. <p>Then you can filter the emails generated by watching this repository by looking for the subject-line prefix “Review Draft Publication:” which the WHATWG will consistently use <a href="https://github.com/whatwg/meta/blob/master/MAINTAINERS.md#review-drafts">as per the Maintainer Guidelines</a>.</p>
  826.  
  827. <p>Watching the repository is the only way to get notified going forward. This blog post serves as an initial announcement and as a way to make everyone familiar with the process going forward.</p>
  828.  
  829. <p>Thanks for reading through three non-technical posts in a row. It will get technical again soon!</p>
  830. ]]></content:encoded>
  831. </item>
  832. <item>
  833. <title>Changing the copyright license for Living Standards</title>
  834. <link>https://blog.whatwg.org/copyright-license-change</link>
  835. <dc:creator><![CDATA[Anne van Kesteren]]></dc:creator>
  836. <pubDate>Wed, 13 Dec 2017 17:00:29 +0000</pubDate>
  837. <category><![CDATA[WHATWG]]></category>
  838. <guid isPermaLink="false">https://blog.whatwg.org/?p=12918</guid>
  839.  
  840. <description><![CDATA[The recent changes to the WHATWG are designed to help the web-standards development community work together across the broadest possible spectrum of developers, implementers, and end-users. As part of this change, we decided to move our standards from being licensed under the CC0 public domain dedication to the CC BY license. This decision was not [&#8230;]]]></description>
  841. <content:encoded><![CDATA[<p>The <a href="/working-mode-changes">recent changes to the WHATWG</a> are designed to help the web-standards development community work together across the broadest possible spectrum of developers, implementers, and end-users. As part of this change, we decided to move our standards from being licensed under the <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a> public domain dedication to the <a href="https://creativecommons.org/licenses/by/4.0/">CC BY</a> license.</p>
  842.  
  843. <p>This decision was not made lightly. We valued the alignment of CC0 with <a href="https://www.w3.org/Policy.html">the original public domain dedication of the WWW project</a>; the ease with which it allows remixing and refactoring of standards; and the way in which it allows copying of snippets or examples into software that implements or uses the standards.</p>
  844.  
  845. <p>While CC0 is beneficial in some ways, it also has some disadvantages. The lack of an attribution requirement may seem convenient, but it can also cause confusion in the standards community. For example, there are derivative specifications ("forks") that are not prominently identified as copies of WHATWG standards. Such unattributed forks create confusion both about the origin of the standard and about any applicable intellectual property rights (IPR) commitments. Use of the CC BY license makes it easier for implementers to trace what they are implementing back to the original source and its accompanying IPR commitments.</p>
  846.  
  847. <p>Additionally, CC0 <a href="https://opensource.org/faq#cc-zero">is not approved by the Open Source Initiative</a>. Although their reasoning is not very applicable in the context of the WHATWG, which has its own system for patent grants, this lack of approval from a prominent organization involved in defining "open source" can discourage participation.</p>
  848.  
  849. <p>Moving to CC BY addresses these disadvantages and also allows for a reduction in license proliferation. We were able to replace the custom license of the HTML Standard, which was a source of some confusion, with CC BY. CC BY still allows modification and redistribution, but adds on the relatively modest burden of attribution. We believe that, on balance, this change is the best path forward for the community.</p>]]></content:encoded>
  850. </item>
  851. </channel>
  852. </rss>
  853.  

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid RSS" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=http%3A//blog.whatwg.org/feed/

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda