[csswg-drafts] [selectors] Should empty string link match :visited?

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [selectors] Should empty string link match :visited? ==
Should this match `:visited`?

<a href="">Link</a>

An empty URL points to the base URL, so assuming there is no `<base>` and history is enabled, I guess `:visited` should match.

However, there are various WPT tests like https://github.com/web-platform-tests/wpt/blob/6562ed003eebcd25d093ae52d68de28a0ae0d786/css/CSS2/selectors/link-visited-selector-001.xht which are manual. If the above is supposed to work, why not make them   automated by linking the current page?

And Edge seems to have some weird bugs, like `<a href="">` matching `:visited` in jsfiddle but not in jsbin. However, this seems to work everywhere:

document.querySelector('a').href = location.href

So can you confirm that this is supposed to work?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2884 using your GitHub account

Received on Thursday, 5 July 2018 12:05:17 UTC