blob: 86b885d46c09edc5996907e3aa79b33b1073b44b [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<div id="test-content">
<label tabindex="0"><input tabindex="0"></label>
<fieldset tabindex="0">
<legend tabindex="0">foo</legend>
<input tabindex="0">
</fieldset>
</div>
<script>
description('Tests for calling focus() on a label element and a legend element. They should not move the focus to the associated element.');
let testContent = document.getElementById('test-content');
shouldBe('testContent.querySelector("label").focus(); document.activeElement', 'testContent.querySelector("label")');
shouldBe('testContent.querySelector("legend").focus(); document.activeElement', 'testContent.querySelector("legend")');
</script>
</body>
</html>