代码之家  ›  专栏  ›  技术社区  ›  Josh

Jaws18读取IE11中的角度数据绑定

  •  0
  • Josh  · 技术社区  · 7 年前

    我的任务是使我们的一些网页符合508标准。在使用Jaws18浏览页面时,我注意到使用ng if或ng show添加的部分正在作为数据绑定读回。在Chrome中浏览时不会出现这种情况,只有IE11。(不幸的是,这正是我需要测试的。)

    当屏幕读取器到达与ng一起添加的第二部分时,如果{拒绝.代码}}被读回为“左大括号左大括号拒绝代码右大括号右大括号”。

    有人知道如何纠正这种行为吗?

    <form class="form-horizontal" id="SearchForm" name="SearchForm" novalidate> 
    <section id="test">
        <div class="form-group">
            <label for="pcEmail" class="col-sm-3 control-label">
                <span class="glyphicon-asterisk"></span> E-mail
            </label>
            <div class="col-sm-6">
                <input type="email" ng-pattern="/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/" class="form-control"
                       id="pcEmail" name="pcEmail"
                       placeholder="E-mail"
                       ng-model="vm.searchModel.email"
                       ng-required="true"
                       ng-maxlength="50" />
            </div>
        </div>
        <div class="row text-center" ng-if="vm.submitBtnVisible">
            <div class="col-md-6" ng-if="vm.searchModel.recertificationYearId > 0">
                <button class=" btn btn-lg btn-primary" type="submit" ng-disabled="cediRecertSearchForm.$invalid" ng-click="vm.checkStatus(cediRecertSearchForm)">
                    Check Status
                </button>
            </div>
        </div>
    </section>
    <section ng-if="vm.searchResult.rejectionReasons && vm.searchResult.rejectionReasons.length >0" aria-live="polite" tabindex="0">
        <div data-cedi-widget-header subtitle="Rejection Reasons History"></div>
            <table class="table table-bordered table-condensed table-responsive">
                <thead>
                    <tr>
                        <th>Rejection Code</th>
                        <th>Rejection Desc</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="rejectionCode in vm.searchResult.rejectionReasons">
                        <td>{{rejectionCode.code}}</td>
                        <td>{{rejectionCode.description}}</td>
                    </tr>
                </tbody>
            </table>
    </section>
    

    1 回复  |  直到 7 年前
        1
  •  0
  •   Roberto Congiu    7 年前

    请使用ng bind或ng bind html代替 {{}} . 例子:

    <tr ng-repeat="rejectionCode in vm.searchResult.rejectionReasons">
       <td ng-bind="rejectionCode.code"></td>
       <td ng-bind="rejectionCode.description"></td>
    </tr>