%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
module('Accessibility - Search'); var MultipleSelection = require('select2/selection/multiple'); var InlineSearch = require('select2/selection/search'); var $ = require('jquery'); var Utils = require('select2/utils'); var Options = require('select2/options'); var options = new Options({}); test('aria-autocomplete attribute is present', function (assert) { var $select = $('#qunit-fixture .multiple'); var CustomSelection = Utils.Decorate(MultipleSelection, InlineSearch); var selection = new CustomSelection($select, options); var $selection = selection.render(); // Update the selection so the search is rendered selection.update([]); assert.equal( $selection.find('input').attr('aria-autocomplete'), 'list', 'The search box is marked as autocomplete' ); }); test('aria-activedescendant should be removed when closed', function (assert) { var $select = $('#qunit-fixture .multiple'); var CustomSelection = Utils.Decorate(MultipleSelection, InlineSearch); var selection = new CustomSelection($select, options); var $selection = selection.render(); var container = new MockContainer(); selection.bind(container, $('<span></span>')); // Update the selection so the search is rendered selection.update([]); var $search = $selection.find('input'); $search.attr('aria-activedescendant', 'something'); container.trigger('close'); assert.ok( !$search.attr('aria-activedescendant'), 'There is no active descendant when the dropdown is closed' ); });