JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<div class="ui-widget">
<label for="tags">Tags: </label>
<span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
<input id="tags" class="ui-autocomplete-input" autocomplete="off">
</div>
<br>
<p>While running JAWS, type "r" in the input above, then arrow down to see the second instance of "Fortran" knock JAWS out of forms mode.</p>
JavaScript
$(function() {
var availableTags = [
"ActionScript",
"Erlang",
"Fortran version one",
"Fortran version two",
"Groovy",
"Haskell",
"JavaScript",
];
$.widget('custom.testcomplete', $.ui.autocomplete,{
_renderItem: function( ul, item ) {
//truncating the value here reveals the issue
var limit = 12
if(item.value.length > limit){
item.value = item.value.substring(0,limit)+'...';
}
return $( "<li>" )
.attr( "data-value", item.value )
.append( $( "<a>" ).text( item.label ) )
.appendTo( ul );
}
});
$( "#tags" ).testcomplete({
source: availableTags
});
});