-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
M118: [A11y] Update ignored state for radio/checkbox labels correctly
This is a cherry pick of 2 CLs: CL:4903842 -- original fix CL:4907948 -- fix for Android test If the text inside of a label is updating its cached values before the label does, we could return an incorrect value for the ignored state of the text. This resulted in radio buttons sometimes not updating their name after being made visible. Fixed: 1487553 Commit-Queue: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com> Change-Id: I926c7103f40b9cb3de6bb10f96517e8ae5f57ccf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4908088 Commit-Queue: Benjamin Beaudry <benjamin.beaudry@microsoft.com> Cr-Commit-Position: refs/branch-heads/5993@{#1056} Cr-Branched-From: 5113507-refs/heads/main@{#1192594}
- Loading branch information
1 parent
7bc0c7d
commit b9e3b71
Showing
8 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
content/test/data/accessibility/html/input-radio-unhidden-expected-blink.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
rootWebArea name='done' | ||
++genericContainer ignored | ||
++++genericContainer ignored | ||
++++++main | ||
++++++++group name='These radio buttons will randomly not have a label on Chromium web browsers.' | ||
++++++++++legend | ||
++++++++++++staticText name='These radio buttons will randomly not have a label on Chromium web browsers.' | ||
++++++++++++++inlineTextBox name='These radio buttons will randomly not have a label on Chromium web browsers.' | ||
++++++++++radioButton name='Apple' checkedState=false | ||
++++++++++labelText | ||
++++++++++++staticText name='Apple' | ||
++++++++++++++inlineTextBox name='Apple' | ||
++++++++++radioButton name='Banana' checkedState=false | ||
++++++++++labelText | ||
++++++++++++staticText name='Banana' | ||
++++++++++++++inlineTextBox name='Banana' | ||
++++++++++radioButton name='Cherry' checkedState=false | ||
++++++++++labelText | ||
++++++++++++staticText name='Cherry' | ||
++++++++++++++inlineTextBox name='Cherry' | ||
++++++++++radioButton name='Durian' checkedState=false | ||
++++++++++labelText | ||
++++++++++++staticText name='Durian' | ||
++++++++++++++inlineTextBox name='Durian' | ||
++++++++++radioButton name='Eggplant' checkedState=false | ||
++++++++++labelText | ||
++++++++++++staticText name='Eggplant' | ||
++++++++++++++inlineTextBox name='Eggplant' |
29 changes: 29 additions & 0 deletions
29
content/test/data/accessibility/html/input-radio-unhidden.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
@WAIT-FOR:done | ||
--> | ||
<main> | ||
<fieldset style="display:none;"> | ||
<legend>These radio buttons will randomly not have a label on Chromium web browsers.</legend> | ||
<input type="radio" name="hiddenRadio" id="apple"> | ||
<label for="apple"><span>Apple</span></label> | ||
<input type="radio" name="hiddenRadio" id="banana"> | ||
<label for="banana"><span>Banana</span></label> | ||
<input type="radio" name="hiddenRadio" id="cherry"> | ||
<label for="cherry"><span>Cherry</span></label> | ||
<input type="radio" name="hiddenRadio" id="durian"> | ||
<label for="durian"><span>Durian</span></label> | ||
<input type="radio" name="hiddenRadio" id="eggplant"> | ||
<label for="eggplant"><span>Eggplant</span></label> | ||
</fieldset> | ||
</main> | ||
<script async defer> | ||
document.addEventListener('DOMContentLoaded', () => { | ||
requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
document.querySelector('fieldset').style.display = 'block'; | ||
document.title = 'done'; | ||
}); | ||
}) | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters