-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make target=_blank imply noopener; support opener #4330
Conversation
This reduces the number of coupled top-level browsing contexts and thereby reduces the attack surface somewhat. Tests: ... Fixes #4078.
This is already implemented by Firefox and Safari (automated tests don't work due to lack of BroadcastChannel). Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=927340. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copypasta is bad; other requests are a bonus.
Tests for this will be important. It seems like you'll want to test the entire matrix of:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits
cc @whatwg/documentation |
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188 --HG-- rename : testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_iplicit_noopener.html => testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_implicit_noopener.html
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188 --HG-- rename : testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_iplicit_noopener.html => testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_implicit_noopener.html
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188 UltraBlame original commit: de035411df5175e229feddb7f1cf2f17eeafb872
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188 UltraBlame original commit: de035411df5175e229feddb7f1cf2f17eeafb872
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188 UltraBlame original commit: eca5d888e47f18532896f5671d22f463fab67bf5
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188 UltraBlame original commit: de035411df5175e229feddb7f1cf2f17eeafb872
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188 UltraBlame original commit: eca5d888e47f18532896f5671d22f463fab67bf5
…ener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For whatwg/html#4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188 UltraBlame original commit: eca5d888e47f18532896f5671d22f463fab67bf5
Hello. I've been reviewing changes to HTML on behalf of the W3C's Accessible Platform Architectures Working Group, and had some questions about this change. Regarding the behaviour illustrated in the opener example: if navigation occurs in a different tab or window to the one in which the focus lies, then users of assistive technologies (specifically screen readers or magnifiers) may not be made aware of that navigation in the other tab/window. I tested in IE 11, Firefox 70 and Chrome 78, with NVDA 2019.2.1 and JAWS 2019, as well as Safari and VoiceOver on macOS Mojave, and found the same behaviour in all combinations of browser and screen-reader:
I realise that this PR only tweaks the implementation, rather than introducing the potential accessibility issues. Further, perhaps this would more naturally fall under the scope of WCAG than the HTML spec. However, I was wondering...
If the answer is 'yes' to any of the above, and you'd like a PR to amend the wording, I'd be happy to file one. Other cc @whatwg/a11y |
@matatk I recommend filing a new issue. It's not entirely clear to me what you're suggesting screen reader technology does for noopener vs a normal popup so maybe clarify that there. Also, would you like to join the a11y team? |
Hi @annevk, thanks for your reply. To clarify a bit: I don't think this is a new problem that was introduced by this PR—it seems it was the situation all along, but as I've rarely seen pop-ups that navigate their openers in the wild, I'd not noticed it until I looked into this change. I'll be AFK for a few days, but when back I'll do a bit more research (as I don't grok why newly-opened windows, as opposed to tabs, can't navigate their My cycles are somewhat limited, but I'd be happy to join the a11y team and see how it goes; hope I can be of help :-). |
See: whatwg/html#4330 Removed the wordings that could imply the behavior is vendor-specific. Added links to Browser compatibility for easy reference.
* <a target="_blank"> has implicit noopener as per spec. See: whatwg/html#4330 Removed the wordings that could imply the behavior is vendor-specific. Added links to Browser compatibility for easy reference. * <a>: Merged the two similar notes, added more links. * <area> <form>: Applied the same from 517d127 and c531fc3. Should follow up when browser-compat-data for form is revised. * <a> <area> <form>: Applied the new note box style.
This comment was marked as off-topic.
This comment was marked as off-topic.
* <a target="_blank"> has implicit noopener as per spec. See: whatwg/html#4330 Removed the wordings that could imply the behavior is vendor-specific. Added links to Browser compatibility for easy reference. * <a>: Merged the two similar notes, added more links. * <area> <form>: Applied the same from 517d127 and c531fc3. Should follow up when browser-compat-data for form is revised. * <a> <area> <form>: Applied the new note box style.
This reduces the number of coupled top-level browsing contexts and thereby reduces the attack surface somewhat.
Tests: ...
Fixes #4078.
/index.html ( diff )
/links.html ( diff )