wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Click anchor without link for summary inside details element should trigger open/close

Open chromium-wpt-export-bot opened this issue 3 years ago • 0 comments

Currently, HTMLAnchorElement::HasActivationBehavior() always return true. This causes the HTMLSummaryElement::IsClickableControl() to also return true and then, the HTMLSummaryElement::DefaultEventHandler will not toggle open the <details> element.

However, the activation behavior for <a> should be to do nothing if no href attribute was found [1]. The fix is to change HTMLAnchorElement::HasActivationBehavior() to return true only if a link is found.

[1] https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element:activation-behaviour

Change-Id: Ibc1889d91e9a39d05343e3371cb3202e7104db74 Fixed: 1230025

Reviewed-on: https://chromium-review.googlesource.com/3818032 WPT-Export-Revision: af6ed541290c7c84efd3ec64dba848ed3db7c344

chromium-wpt-export-bot avatar Aug 09 '22 15:08 chromium-wpt-export-bot