屏幕阅读器 - jquery弹出窗口

Mim*_*eto 5 html javascript jquery section508 popup

我有一个弹出窗口,用户必须单击才能填写表单并提交表单.我不想离开页面,因此我使用弹出窗口的原因(打开对此的建议).

我在这里遇到的问题是,当弹出窗口打开时,JAWS(屏幕阅读器)无法识别.我尝试将焦点设置到弹出窗口中的一个输入字段,但它只读取该输入字段,然后继续读取原始页面.除了焦点输入之外,忽略标题和其他任何内容.也许任何人都知道我可以如何提醒屏幕阅读器弹出窗口已打开然后强制屏幕阅读器通读弹出窗口并停止?

这是单击时显示弹出窗口的按钮:

<button type="submit" name="btnCreatee" id="btnCreate" value="#createIndexDialog">Create Index</button>
Run Code Online (Sandbox Code Playgroud)

这是弹出窗口的HTML内容:

    <div id="createIndexDialog" class="window" style="background-color:#ffffff;">
<div align="right"><a href="#" class="closeIndexCreation" id="closeIndexCreation"></a></div>
    <h2 style="text-align:center;color:#333;">Create an Index</h2>
    <br />
    <ul class="statusMessages" style="background: transparent;"></ul>
    <form name="createIndexFrm" id="createIndexFrm" method="post" action="createIndex.do">
        <input type="hidden" name="operation" value="create">
        <div id="t" border="0">
            <div style="display:block;margin:0 0 15px 54px;">
                <span ><b>Name:</b><input type="text" class="requiredField" maxlength="16" name="name" id="name" size="40" onblur="checkform()" style="margin-left:8px;"></span>
            </div>
            <div style="display:block;margin:0 0 15px 104px;">
                <span>
                    <ul style="list-style:none;background:#fff;border:2px solid #ebebeb;padding:5px;border-radius:5px;width:auto;">
                        <li>Index name can not be changed later.</li>
                        <li>It is not case sensitive.</li>
                        <li>Specify from 1 to 30 characters using letters (A-Z, a-z) or numbers (0-9)</li>
                    </ul>
                </span>
            </div>
            <div style="display:block;margin:0 0 15px 54px;">
                <span ><b>Type:</b><input type="radio" name="data_source_type" value="0" checked style="margin-left:5px;"> Database, <i>Select data via database connection</i></span>
            </div>
            <div style="display:block;margin:0 0 15px 0px;">
                <span ><b>Display Name:</b><input type="text" maxlength="30" name="displayName" id="displayName" size="40" value="" style="margin-left:8px;"></span>
            </div>
            <div style="display:block;margin:0 0 15px 15px;">
                <span ><b>Description:</b><textarea name="desc" id="desc" cols="75" rows="3" wrap="virtual" style="margin-left:5px;"></textarea></span>
            </div>
            <div style="display:block;margin-left:240px;">  
                <span><button type="submit" class="general ui-corner-all" name="submitCreate" id="submitCreate" onclick="createIndexFrm.operation.value='create'; document.createIndexFrm.submit(); return false;">Create</button></span>
            </div>
        </div>
    </form></div>
Run Code Online (Sandbox Code Playgroud)

这是创建和显示弹出窗口的代码:

$('button[name=btnCreatee]').click(function(e) {
            e.preventDefault();
            var id = $(this).attr('value');
            var maskHeight = $(document).height();
            var maskWidth = $(window).width();
            $('#mask').css({'width':maskWidth,'height':maskHeight});
            $('#mask').fadeIn(200);
            $('#mask').fadeTo("fast",0.8);
            var winH = $(window).height();
            var winW = $(window).width();               
            //$(id).css('top',  winH/2-$(id).height()/2);
            //$(id).css('left', winW/2-$(id).width()/2);
            //$(id).fadeIn(400);
            $('#createIndexDialog').css('left', winW/2-$('#createIndexDialog').width()/2);              
            $('#createIndexDialog').show();

        });
Run Code Online (Sandbox Code Playgroud)

PS我正在编辑现有代码,以使页面508符合/可访问.

小智 0

你为什么要创建一个新窗口?这将有助于:

window.open('windowname');
Run Code Online (Sandbox Code Playgroud)