Unplanned
Last Updated: 05 Aug 2019 09:43 by ADMIN
Jeff
Created on: 05 Aug 2019 09:39
Category: Input
Type: Bug Report
1
RadInput Does not display correctly in JAWS Form Fields Dialog with EnableAriaSupport

The role=textbox is set to the wrapper element instead of the input element itself. That confuses the screen readers such as JAWS, which leads to the Form Fields dialog to skip them. 

As a temporary workaround, the role of the wrapper element with class RadInput can be set to "presentation"

<script>
    function pageLoadHandler() {
        $telerik.$(".RadInput").attr("role", "presentation")
        // Sys.Application.remove_load(pageLoadHandler);  
    }
    Sys.Application.add_load(pageLoadHandler);
</script>

Or using the following script: 

var WebARIAHelper = (function ($) {

  // Assign default ARIA roles to desired elements
  function AssignDefaultARIARoles(element) {
    element = (element || document.body);

    // TFS 110547 - Mark SPAN/DIV around RadInput elements as presentation to avoid confusing JAWS form field dialog
    $("span.RadInput, div.RadInput", element).attr("role", "presentation");
  }
  
  // Handle AJAX EndRequest event to process any new content
  function WebARIAHelperEndRequestHandler(sender, args) {
    if (args.get_error() == null) {
      // Make sure all page controls can finish their ready event processes before looking at DOM
      window.setTimeout(function () {
        AssignDefaultARIARoles();
      }, 10);
    }
  }
         
  $(function () {
    // Make sure all page controls can finish their ready event processes before looking at DOM
    window.setTimeout(function () {
      AssignDefaultARIARoles();
    }, 10);

    if (window.Sys && Sys.WebForms && Sys.WebForms.PageRequestManager) {
      var instance = Sys.WebForms.PageRequestManager.getInstance();
      if (instance) instance.add_endRequest(WebARIAHelperEndRequestHandler);
    }
  });


  return null;
}
)($ || $telerik.$);

0 comments