Search code examples
accessibilityangularjs-ng-clickjaws-screen-reader

ng-click and jaws compatibility


in a web page, I am trying to open an overlay with the help of ng-click and there is no href available for this with the help of java script, respective overlay is being called. This function is working fine with keyboard when no screen reader is being used or NVDA screen reader is being used. However, when I use Jaws screen reader, functionality is not working at all. Can anyone suggest approach how to fix this issue without using href? here is code I am using HTML

    <a href="javascript:void(0)" ng-click="openModal()">
<h2 class="mu-item__title" ng-if="!hideInfo" data-share-title>{{videoData.title}} <span class="screenreader">{{item.contenttype_t}}</span></h2>

JavaScript code

    $scope.openModal = function() {
if ($attrs.modalvideo) {                  
    $scope.openInModal = true;
    $scope.fromChild = false;
    $scope.genericData.showModal = true;
    $scope.genericData.isVideo = true;
    $scope.modalData = $scope.videoData;
}

};

can anyone suggest what need to be changed in current code? Thanks Anubhav Mitra


Solution

  • Try using the button instead of anchor tag

        <button aria-label="{{item.contenttype_t}}" ng-click="openModal()" ng-if="!hideInfo">
          <h2 class="mu-item__title" data-share-title>{{videoData.title}}</h2>
        </button>