diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SearchFacetsTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SearchFacetsTest.php index c6d5283f969e8e762797201316732c1631484e0f..a07d27613063f39765334dc22327c4a24b92d4fe 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SearchFacetsTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SearchFacetsTest.php @@ -85,15 +85,16 @@ class SearchFacetsTest extends \VuFindTest\Unit\MinkTestCase $this->snooze(); $items = $page->findAll('css', '#modal #facet-list-count .js-facet-item'); $this->assertEquals($limit * 2, count($items)); + $excludeControl = $exclusionActive ? 'Exclude matching results ' : ''; $this->assertEquals( - 'Weird IDs 9 ' - . 'Fiction 7 ' - . 'The Study Of P|pes 1 ' - . 'The Study and Scor_ng of Dots.and-Dashes:Colons 1 ' - . 'The Study of "Important" Things 1 ' - . 'The Study of %\'s? 1 ' - . 'The Study of +\'s? 1 ' - . 'The Study of @Twitter #test 1 ' + 'Weird IDs 9 ' . $excludeControl + . 'Fiction 7 ' . $excludeControl + . 'The Study Of P|pes 1 ' . $excludeControl + . 'The Study and Scor_ng of Dots.and-Dashes:Colons 1 ' . $excludeControl + . 'The Study of "Important" Things 1 ' . $excludeControl + . 'The Study of %\'s? 1 ' . $excludeControl + . 'The Study of +\'s? 1 ' . $excludeControl + . 'The Study of @Twitter #test 1 ' . $excludeControl . 'more ...', $this->findCss($page, '#modal #facet-list-count')->getText() ); @@ -107,10 +108,10 @@ class SearchFacetsTest extends \VuFindTest\Unit\MinkTestCase $items = $page->findAll('css', '#modal #facet-list-index .js-facet-item'); $this->assertEquals($limit, count($items)); // reset number of items $this->assertEquals( - 'Fiction 7 ' - . 'The Study Of P|pes 1 ' - . 'The Study and Scor_ng of Dots.and-Dashes:Colons 1 ' - . 'The Study of "Important" Things 1 ' + 'Fiction 7 ' . $excludeControl + . 'The Study Of P|pes 1 ' . $excludeControl + . 'The Study and Scor_ng of Dots.and-Dashes:Colons 1 ' . $excludeControl + . 'The Study of "Important" Things 1 ' . $excludeControl . 'more ...', $this->findCss($page, '#modal #facet-list-index')->getText() ); @@ -219,7 +220,7 @@ class SearchFacetsTest extends \VuFindTest\Unit\MinkTestCase $genreMore = $this->findCss($page, '#more-narrowGroupHidden-genre_facet'); $genreMore->click(); $this->facetListProcedure($page, $limit, true); - $this->assertEquals(1, count($page->find('css', '.active-filters'))); + $this->assertEquals(1, count($page->findAll('css', '.active-filters'))); } /** diff --git a/themes/bootstrap3/templates/Recommend/SideFacets/single-facet.phtml b/themes/bootstrap3/templates/Recommend/SideFacets/single-facet.phtml index 719347269a11f340f3dd3df007afba9335f5e5e8..39707d78bd200a65ded034b97ad6003d7f1a8fa7 100644 --- a/themes/bootstrap3/templates/Recommend/SideFacets/single-facet.phtml +++ b/themes/bootstrap3/templates/Recommend/SideFacets/single-facet.phtml @@ -50,7 +50,10 @@ <?php if ($this->exclude && !$this->facet['isApplied']): ?> <?php $excludeURL = $this->urlBase . $this->url->addFacet($this->group, $this->facet['value'], 'NOT'); ?> - <a href="<?=$excludeURL ?>" data-lightbox-ignore title="<?=$this->transEsc('exclude_facet') ?>" class="exclude"><i class="fa fa-times" aria-hidden="true"></i></a> + <a href="<?=$excludeURL ?>" data-lightbox-ignore class="exclude"> + <i class="fa fa-times" aria-hidden="true"></i> + <span class="sr-only"><?=$this->transEsc('exclude_facet') ?></span> + </a> <?php endif; ?> <?=$hasSubLinks ? '</li>' : '</a>'; ?> diff --git a/themes/bootstrap3/templates/Recommend/TopFacets.phtml b/themes/bootstrap3/templates/Recommend/TopFacets.phtml index 4c9325c4f2d191b88db81b4398584c272b18bb71..88c635863200a11e2cc4bcc6eb6df7be4a8a3a62 100644 --- a/themes/bootstrap3/templates/Recommend/TopFacets.phtml +++ b/themes/bootstrap3/templates/Recommend/TopFacets.phtml @@ -33,7 +33,10 @@ --></a> <span class="badge"><?=$this->localizedNumber($thisFacet['count']) ?></span> <?php if ($allowExclude): ?> - <a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>" title="<?=$this->transEsc('exclude_facet')?>"><i class="fa fa-times" aria-hidden="true"></i></a> + <a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>"> + <i class="fa fa-times" aria-hidden="true"></i> + <span class="sr-only"><?=$this->transEsc('exclude_facet') ?></span> + </a> <?php endif; ?> <?php endif; ?> </span>