Skip to content

Commit 5d2da59

Browse files
authored
1 parent 777cb34 commit 5d2da59

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

html/semantics/selectors/pseudo-classes/disabled.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
</select>
2727
<textarea id=textarea1>textarea1</textarea>
2828
<textarea disabled id=textarea2>textarea2</textarea>
29+
<fieldset id=fieldset1></fieldset>
2930
<fieldset disabled id=fieldset2>
3031
<legend><input type=checkbox id=club></legend>
3132
<p><label>Name on card: <input id=clubname required></label></p>
@@ -39,21 +40,21 @@
3940
<progress disabled></progress>
4041

4142
<script>
42-
testSelectorIdsMatch(":disabled", ["button2", "input2", "select2", "optgroup2", "option2", "textarea2", "clubname", "clubnum"], "':disabled' should match only disabled elements");
43+
testSelectorIdsMatch(":disabled", ["button2", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should match only disabled elements");
4344

4445
document.getElementById("button2").removeAttribute("disabled");
45-
testSelectorIdsMatch(":disabled", ["input2", "select2", "optgroup2", "option2", "textarea2", "clubname", "clubnum"], "':disabled' should not match elements whose disabled attribute has been removed");
46+
testSelectorIdsMatch(":disabled", ["input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should not match elements whose disabled attribute has been removed");
4647

4748
document.getElementById("button1").setAttribute("disabled", "disabled");
48-
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "clubname", "clubnum"], "':disabled' should also match elements whose disabled attribute has been set");
49+
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should also match elements whose disabled attribute has been set");
4950

5051
document.getElementById("button1").setAttribute("disabled", "disabled");
51-
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "clubname", "clubnum"], "':disabled' should also match elements whose disabled attribute has been set twice");
52+
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should also match elements whose disabled attribute has been set twice");
5253

5354
document.getElementById("input2").setAttribute("type", "submit"); // change input type to submit
54-
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "clubname", "clubnum"], "':disabled' should also match disabled elements whose type has changed");
55+
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should also match disabled elements whose type has changed");
5556

5657
var input = document.createElement("input");
5758
input.setAttribute("disabled", "disabled");
58-
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "clubname", "clubnum"], "':disabled' should not match elements not in the document");
59+
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should not match elements not in the document");
5960
</script>

html/semantics/selectors/pseudo-classes/enabled.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
</menu>
3737
</form>
3838
<fieldset id=fieldset1></fieldset>
39+
<fieldset disabled id=fieldset2></fieldset>
3940

4041
<script>
4142
testSelectorIdsMatch(":enabled", ["button1", "input1", "select1", "optgroup1", "option1", "textarea1", "submitbutton", "fieldset1"], "':enabled' elements that are not disabled");

0 commit comments

Comments
 (0)