See new tests over at https://github.com/w3c/web-platform-tests/pull/8723. Corresponding HTML Standard change is at https://github.com/whatwg/html/pull/3111.
Fixed by https://bugs.webkit.org/show_bug.cgi?id=83930.