diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/conformance-checkers/html-aria/selected-state | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/conformance-checkers/html-aria/selected-state')
3 files changed, 104 insertions, 0 deletions
diff --git a/testing/web-platform/tests/conformance-checkers/html-aria/selected-state/670.html b/testing/web-platform/tests/conformance-checkers/html-aria/selected-state/670.html new file mode 100644 index 0000000000..de95a2e19d --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html-aria/selected-state/670.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <title>ARIA 1.0 Test Case 670</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + </head> + <body> + <h1>ARIA 1.0 Test Case 670</h1> + + <ul role="listbox"> + <li role="option" aria-selected="true" id="ID_OPTION" tabindex="0">Option 1</li> + <li role="option">Option 2</li> + </ul> + + <h2>Description</h2> + <p>For an element with role role "option" which is a child of an element with + role "listbox", and the value of the "aria-selected" attribute is equal + to "true".</p> + + <script> + + function setFocus() { + var node = document.getElementById('ID_OPTION'); + node.focus(); + } + + window.addEventListener('load', setFocus); + </script> + </body> + +</html> + diff --git a/testing/web-platform/tests/conformance-checkers/html-aria/selected-state/671.html b/testing/web-platform/tests/conformance-checkers/html-aria/selected-state/671.html new file mode 100644 index 0000000000..4d36b22cf1 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html-aria/selected-state/671.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> + <head> + <title>ARIA 1.0 Test Case 671</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + </head> + <body> + <h1>ARIA 1.0 Test Case 671</h1> + + <ul role="listbox"> + <li role="option" aria-selected="false" id="ID_OPTION" tabindex="0">Option 1</li> + <li role="option">Option 2</li> + </ul> + + <h2>Description</h2> + <p>For an element with role role "option" which is a child of an element with + role "listbox", and the value of the "aria-selected" attribute is NOT equal + to "true" or the attribute is undefined.</p> + + + <script> + + function setFocus() { + var test_node = document.getElementById('ID_OPTION'); + test_node.focus(); + } + + window.addEventListener('load', setFocus); + </script> + </body> + +</html> + + diff --git a/testing/web-platform/tests/conformance-checkers/html-aria/selected-state/672.html b/testing/web-platform/tests/conformance-checkers/html-aria/selected-state/672.html new file mode 100644 index 0000000000..962e6b944b --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html-aria/selected-state/672.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> + <head> + <title>ARIA 1.0 Test Case 672</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + </head> + <body> + <h1>ARIA 1.0 Test Case 672</h1> + <ul role="listbox"> + <li role="option" aria-selected="false" id="TEST_ID" tabindex="0">Option 1</li> + <li role="option">Option 2</li> + </ul> + + <h2>Description</h2> + <p>For an element with role "option" which is a child of an element with role "listbox", + and the value of the "aria-selected" attribute changes (from "true", or to "true").</p> + + <script> + function changeSelectedState() { + var test_node = document.getElementById('TEST_ID'); + var state = test_node.getAttribute('aria-selected'); + + if (state === 'false') test_node.setAttribute('aria-selected', 'true'); + else test_node.setAttribute('aria-selected', 'true'); + + } + + function setFocus() { + var test_node = document.getElementById('TEST_ID'); + test_node.focus(); + setTimeout(changeSelectedState,1000); + } + + window.addEventListener('load', setFocus); + </script> + </body> + +</html> |