user391986 user391986 - 3 months ago 36
Javascript Question

jquery ui autocomplete adding a span

I am using jQuery autocomplete on a div but I am getting this extra span added automatically by jquery

"<span role="status" aria-live="polite" class="ui-helper-hidden-accessible">search test</span>"

How can I prevent this span from being created?


It's for accessibility reason, blind people can 'read' how much results are find. If you really want to delete this, you can modify the source code:

this.liveRegion = $( "<span>", {
                role: "status",
                "aria-live": "polite"
            .addClass( "ui-helper-hidden-accessible" )
            .insertAfter( this.element );

But it's not recommended.