Skip to content

Commit

Permalink
SCR37: Fix formatting and related resources; remove working-example link
Browse files Browse the repository at this point in the history
Not sure why, but the formatting and related resources differed from
what was last seen under WAI/WCAG22 (but matched WAI/WCAG21).
  • Loading branch information
kfranqueiro committed Jul 19, 2024
1 parent c681471 commit 6005796
Showing 1 changed file with 35 additions and 58 deletions.
93 changes: 35 additions & 58 deletions techniques/client-side-script/SCR37.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h3>An options button that opens a dialog</h3>

<pre xml:space="preserve">...
&lt;button onclick="TogglePopup(event,true)"
name="pop0001"&gt;Options&lt;/button&gt;
name="pop0001"&gt;Options&lt;/button&gt;

&lt;div class="popover" id="pop0001"&gt;
&lt;h3&gt;Edit Sort Information&lt;/h3&gt;
Expand Down Expand Up @@ -64,58 +64,46 @@ <h3>An options button that opens a dialog</h3>
<p>The script toggles the display of the popup <code class="el">div</code>, showing it and hiding it. </p>

<pre xml:space="preserve">...
function TogglePopup(evt,show)
{
HarmonizeEvent(evt);
var src = evt.target;
if ("click" == evt.type)
{
evt.returnValue = false;
}
var popID = src.getAttribute("name");
if (popID)
{
var popup = document.getElementById(popID);
if (popup)
{
if (true == show)
{
popup.style.display = "block";
}
else if (false == show)
{
popup.style.display = "none";
}
else
{
popup.style.display = "block" == popup.style.display ? "none" : "block";
}
if ("block" == popup.style.display)
{
//window.alert(document.documentElement.scrollHeight);
popup.style.top = ((document.documentElement.offsetHeight - popup.offsetHeight) / 2 ) + 'px';
popup.style.left = ((document.documentElement.offsetWidth - popup.offsetWidth) / 2) + 'px';
}
}
}
function TogglePopup(evt,show) {
HarmonizeEvent(evt);
var src = evt.target;
if ("click" == evt.type) {
evt.returnValue = false;
}
var popID = src.getAttribute("name");
if (popID) {
var popup = document.getElementById(popID);
if (popup) {
if (true == show) {
popup.style.display = "block";
}
else if (false == show) {
popup.style.display = "none";
}
else {
popup.style.display = "block" == popup.style.display ? "none" : "block";
}
if ("block" == popup.style.display) {
//window.alert(document.documentElement.scrollHeight);
popup.style.top = ((document.documentElement.offsetHeight - popup.offsetHeight) / 2 ) + 'px';
popup.style.left = ((document.documentElement.offsetWidth - popup.offsetWidth) / 2) + 'px';
}
}
}
}

function SubmitForm(elem)
{
elem.parentNode.style.display='none';
return false;
function SubmitForm(elem) {
elem.parentNode.style.display='none';
return false;
}

function ResetForm(elem)
{
elem.parentNode.style.display='none';
return false;
function ResetForm(elem) {
elem.parentNode.style.display='none';
return false;
}
...
</pre>

<p class="working-example">A working example, <a href="../../working-examples/script-options-button-dialog/">an options button that opens a dialog</a>, is available. </p>

</section>
</section><section id="tests"><h2>Tests</h2>
<section class="procedure"><h3>Procedure</h3>
Expand All @@ -139,19 +127,8 @@ <h3>An options button that opens a dialog</h3>
</ul></section><section id="resources"><h2>Resources</h2>

<ul>
<li>Microsoft Developer Network Whitepaper:<a href="http://download.microsoft.com/download/0/f/5/0f5e941c-c495-401a-9031-eab8315da35e/writing_accessible_web_applications.doc"> Writing Accessible Web Applications</a> by Cynthia C. Shelly and George Young. (Microsoft Word Format)</li>
<li>
<a href="https://msdn.microsoft.com/en-us/library/ms695716.aspx">Microsoft Active Accessibility 2.0 SDK</a>. Includes Inspect32.exe and other MSAA tools.</li>
<li>
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd318521(v=vs.85).aspx">Instructions for the Inspect tool</a>
</li>
<li>
<a href="http://www.eramp.com/david/name-role-value-using-inspect.htm">Using the Inspect tool to find name Name, Role and Value for Javascript</a>
</li>
<li>
<a href="http://www.microsoft.com/en-us/download/details.aspx?id=18359">Microsoft Internet Explorer Developer Toolbar.</a>. Allows examination of script-generated DOM in Microsoft Internet Explorer</li>
<li>
<a href="http://getfirebug.com/">Firebug</a>. Allows examination of script-generated DOM in Firefox. </li>
<li><a href="https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/">ARIA Authoring Practices Guide - Dialog (Modal)</a>.</li>
<li><a href="https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element">HTML - the <code class="language-html">dialog</code> element</a>.</li>
</ul>

</section></body></html>

0 comments on commit 6005796

Please sign in to comment.