Skip to content

Commit f9b96c6

Browse files
committed
Finish remaining 3 setup scripts
1 parent a7c7533 commit f9b96c6

File tree

8 files changed

+30
-14
lines changed

8 files changed

+30
-14
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Set aria-required attribute on the text input to "false"
2+
var input = testPageDocument.getElementById('imaginary-word');
3+
if (input) {
4+
input.setAttribute('aria-required', 'false');
5+
}
6+
// set focus on a link after the text input
7+
testPageDocument.querySelector('#afterlink').focus();
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Set aria-required attribute on the text input to "false"
2+
var input = testPageDocument.getElementById('imaginary-word');
3+
if (input) {
4+
input.setAttribute('aria-required', 'false');
5+
}
6+
// set focus on a link before the text input
7+
testPageDocument.querySelector('#beforelink').focus();
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Set aria-required attribute on the text input to "false"
2+
var input = testPageDocument.getElementById('imaginary-word');
3+
if (input) {
4+
input.setAttribute('aria-required', 'false');
5+
}
6+
// set focus on the not required text input
7+
testPageDocument.querySelector('#imaginary-word').focus();

tests/aria/aria-required-text-input/data/js/setRequiredFalse.js

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
refId,type,value,linkText
22
author,metadata,Matt King,
33
authorEmail,metadata,[email protected],
4-
title,metadata,aria-required,
4+
title,metadata,aria-required on a Text Input,
55
reference,metadata,reference/2025-11-5/aria-required-text-input.html,Test Case Page for aria-required on text input Example
6+
designPattern,metadata,,
7+
example,metadata,,
68
aria-required,aria,aria-required,aria-required
79
inputTypeText,htmlAam,inputTypeText,inputTypeText
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
setupScript,setupScriptDescription
22
setFocusAfterRequiredElement,sets focus on a link after the required text input
3+
setFocusAfterNotRequiredElement,sets aria-required to false and then focuses a link after the required text input
34
setFocusBeforeRequiredElement,sets focus on a link before the required text input
5+
setFocusBeforeNotRequiredElement,sets aria-required to false and then focuses a link before the required text input
46
setFocusOnRequiredElement,sets focus on the required text input
7+
setFocusOnNotRequiredElement,sets aria-required to false and then focuses the text input
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
testId,title,presentationNumber,setupScript,instructions,assertions
22
navForwardsToRequiredElement,Navigate forwards to a required text input,5,setFocusBeforeRequiredElement,"Starting at the 'Navigate forwards from here' link, navigate to the 'Imaginary Word' text input.",nameOfInput roleTextbox stateRequired
33
navBackToRequiredElement,Navigate backwards to a required text input,6,setFocusAfterRequiredElement,"Starting at the 'Navigate backwards from here' link, navigate to the 'Imaginary Word' text input.",nameOfInput roleTextbox stateRequired
4-
navForwardsToNotRequiredElement,Navigate forwards to a text input with required set to false,10,setFocusBeforeRequiredElement,"Starting at the 'Navigate forwards from here' link, navigate to the 'Imaginary Word' text input.",nameOfInput roleTextbox
5-
navBackToNotRequiredElement,Navigate backwards to a text input with required set to false,11,setFocusAfterRequiredElement,"Starting at the 'Navigate backwards from here' link, navigate to the 'Imaginary Word' text input.",nameOfInput roleTextbox
4+
navForwardsToNotRequiredElement,Navigate forwards to a text input with required set to false,10,setFocusBeforeNotRequiredElement,"Starting at the 'Navigate forwards from here' link, navigate to the 'Imaginary Word' text input.",nameOfInput roleTextbox
5+
navBackToNotRequiredElement,Navigate backwards to a text input with required set to false,11,setFocusAfterNotRequiredElement,"Starting at the 'Navigate backwards from here' link, navigate to the 'Imaginary Word' text input.",nameOfInput roleTextbox
66
reqInfoAboutRequiredElement,Request information about a required text input,15,setFocusOnRequiredElement,"Starting at the 'Imaginary Word' text input, read information about the text input.",nameOfInput roleTextbox stateRequired
7-
reqInfoAboutNotRequiredElement,Request information about a text input with required set to false,16,setFocusOnRequiredElement,"Starting at the 'Imaginary Word' text input, read information about the text input.",nameOfInput roleTextbox
7+
reqInfoAboutNotRequiredElement,Request information about a text input with required set to false,16,setFocusOnNotRequiredElement,"Starting at the 'Imaginary Word' text input, read information about the text input.",nameOfInput roleTextbox

tests/aria/aria-required-text-input/reference/2025-11-5/aria-required-text-input.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
<h1>Text Input with aria-required Example</h1>
1616
<p>
1717
The below example demonstrates a text input with the <code>aria-required</code> attribute.
18-
Change the state of the <q>Word is Required</q> checkbox to toggle the value of aria-required.
1918
</p>
20-
<form>
21-
<input type="checkbox" id="toggle-required" checked>
22-
<label for="toggle-required">Word is Required</label>
23-
</form>
2419
<section>
2520
<div class="example-header">
2621
<h2 id="ex_label">Example</h2>

0 commit comments

Comments
 (0)