@searchstax-inc/searchstudio-ux-js 0.6.3 → 0.6.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -191,8 +191,8 @@ example of input widget initialization with various options
191
191
  template: `
192
192
  <div class="searchstax-search-input-container">
193
193
  <div class="searchstax-search-input-wrapper">
194
- <input type="text" id="searchstax-search-input" class="searchstax-search-input" placeholder="SEARCH FOR..." />
195
- <button class="searchstax-spinner-icon" id="searchstax-search-input-action-button"></button>
194
+ <input type="text" id="searchstax-search-input" class="searchstax-search-input" placeholder="SEARCH FOR..." aria-label="Search" />
195
+ <button class="searchstax-spinner-icon" id="searchstax-search-input-action-button" aria-label="search"></button>
196
196
  </div>
197
197
  </div>
198
198
  `,
@@ -233,14 +233,11 @@ example of result widget initialization with various options
233
233
  searchResultTemplate: {
234
234
  template: `
235
235
  <div class="searchstax-search-result {{#thumbnail}} has-thumbnail {{/thumbnail}}">
236
+ <a href="{{url}}" data-searchstax-unique-result-id="{{uniqueId}}" class="searchstax-result-item-link searchstax-result-item-link-wrapping" tabindex="0">
236
237
  {{#promoted}}
237
238
  <div class="searchstax-search-result-promoted"></div>
238
239
  {{/promoted}}
239
240
 
240
- {{#url}}
241
- <a href="{{url}}" data-searchstax-unique-result-id="{{uniqueId}}" class="searchstax-result-item-link"></a>
242
- {{/url}}
243
-
244
241
  {{#ribbon}}
245
242
  <div class="searchstax-search-result-ribbon">
246
243
  {{ribbon}}
@@ -278,6 +275,7 @@ example of result widget initialization with various options
278
275
  </p>
279
276
  {{/isImage}}
280
277
  {{/unmappedFields}}
278
+ </a>
281
279
  </div>
282
280
  `,
283
281
  searchResultUniqueIdAttribute: "data-searchstax-unique-result-id"
@@ -289,13 +287,13 @@ example of result widget initialization with various options
289
287
  Showing <strong>no results</strong> for <strong>"{{ searchTerm }}"</strong>
290
288
  <br>
291
289
  {{#spellingSuggestion}}
292
- <span>&nbsp;Did you mean <a href="#" class="searchstax-suggestion-term">{{ spellingSuggestion }}</a>?</span>
290
+ <span>&nbsp;Did you mean <a href="#" class="searchstax-suggestion-term" onclick="searchCallback('{{ spellingSuggestion }}')">{{ spellingSuggestion }}</a>?</span>
293
291
  {{/spellingSuggestion}}
294
292
  </div>
295
- <div>
296
- <p>Try searching for search related terms or topics. We offer a wide variety of content to help you get the information you need.</p>
297
- <p>Lost? Click on the ‘X” in the Search Box to reset your search.</p>
298
- </div>
293
+ <ul class="searchstax-no-results-list">
294
+ <li>Try searching for search related terms or topics. We offer a wide variety of content to help you get the information you need.</li>
295
+ <li>Lost? Click on the ‘X” in the Search Box to reset your search.</li>
296
+ </ul>
299
297
  {{/searchExecuted}}
300
298
  `
301
299
  }
@@ -326,14 +324,11 @@ example of result widget initialization with infinite scroll enabled. This will
326
324
  searchResultTemplate: {
327
325
  template: `
328
326
  <div class="searchstax-search-result {{#thumbnail}} has-thumbnail {{/thumbnail}}">
327
+ <a href="{{url}}" data-searchstax-unique-result-id="{{uniqueId}}" class="searchstax-result-item-link searchstax-result-item-link-wrapping" tabindex="0">
329
328
  {{#promoted}}
330
329
  <div class="searchstax-search-result-promoted"></div>
331
330
  {{/promoted}}
332
331
 
333
- {{#url}}
334
- <a href="{{url}}" data-searchstax-unique-result-id="{{uniqueId}}" class="searchstax-result-item-link"></a>
335
- {{/url}}
336
-
337
332
  {{#ribbon}}
338
333
  <div class="searchstax-search-result-ribbon">
339
334
  {{ribbon}}
@@ -371,6 +366,7 @@ example of result widget initialization with infinite scroll enabled. This will
371
366
  </p>
372
367
  {{/isImage}}
373
368
  {{/unmappedFields}}
369
+ </a>
374
370
  </div>
375
371
  `,
376
372
  searchResultUniqueIdAttribute: "data-searchstax-unique-result-id"
@@ -382,13 +378,13 @@ example of result widget initialization with infinite scroll enabled. This will
382
378
  Showing <strong>no results</strong> for <strong>"{{ searchTerm }}"</strong>
383
379
  <br>
384
380
  {{#spellingSuggestion}}
385
- <span>&nbsp;Did you mean <a href="#" class="searchstax-suggestion-term">{{ spellingSuggestion }}</a>?</span>
381
+ <span>&nbsp;Did you mean <a href="#" class="searchstax-suggestion-term" onclick="searchCallback('{{ spellingSuggestion }}')">{{ spellingSuggestion }}</a>?</span>
386
382
  {{/spellingSuggestion}}
387
383
  </div>
388
- <div>
389
- <p>Try searching for search related terms or topics. We offer a wide variety of content to help you get the information you need.</p>
390
- <p>Lost? Click on the ‘X” in the Search Box to reset your search.</p>
391
- </div>
384
+ <ul class="searchstax-no-results-list">
385
+ <li>Try searching for search related terms or topics. We offer a wide variety of content to help you get the information you need.</li>
386
+ <li>Lost? Click on the ‘X” in the Search Box to reset your search.</li>
387
+ </ul>
392
388
  {{/searchExecuted}}
393
389
  `
394
390
  }
@@ -427,11 +423,11 @@ example of pagination widget initialization with various options
427
423
  {{#results.length}}
428
424
  <div class="searchstax-pagination-container">
429
425
  <div class="searchstax-pagination-content">
430
- <a class="searchstax-pagination-previous {{#isFirstPage}}disabled{{/isFirstPage}}" id="searchstax-pagination-previous">< Previous</a>
426
+ <a class="searchstax-pagination-previous {{#isFirstPage}}disabled{{/isFirstPage}}" id="searchstax-pagination-previous" tabindex="0">< Previous</a>
431
427
  <div class="searchstax-pagination-details">
432
428
  {{startResultIndex}} - {{endResultIndex}} of {{totalResults}}
433
429
  </div>
434
- <a class="searchstax-pagination-next {{#isLastPage}}disabled{{/isLastPage}}" id="searchstax-pagination-next">Next ></a>
430
+ <a class="searchstax-pagination-next {{#isLastPage}}disabled{{/isLastPage}}" id="searchstax-pagination-next" tabindex="0">Next ></a>
435
431
  </div>
436
432
  </div>
437
433
  {{/results.length}}
@@ -444,11 +440,11 @@ example of pagination widget initialization with various options
444
440
  {{#results.length}}
445
441
  <div class="searchstax-pagination-container">
446
442
  <div class="searchstax-pagination-content">
447
- <a class="searchstax-pagination-previous {{#isFirstPage}}disabled{{/isFirstPage}}" id="searchstax-pagination-previous">< Previous</a>
443
+ <a class="searchstax-pagination-previous {{#isFirstPage}}disabled{{/isFirstPage}}" id="searchstax-pagination-previous" tabindex="0">< Previous</a>
448
444
  <div class="searchstax-pagination-details">
449
445
  {{startResultIndex}} - {{endResultIndex}} of {{totalResults}}
450
446
  </div>
451
- <a class="searchstax-pagination-next {{#isLastPage}}disabled{{/isLastPage}}" id="searchstax-pagination-next">Next ></a>
447
+ <a class="searchstax-pagination-next {{#isLastPage}}disabled{{/isLastPage}}" id="searchstax-pagination-next" tabindex="0">Next ></a>
452
448
  </div>
453
449
  </div>
454
450
  {{/results.length}}
@@ -516,10 +512,10 @@ example of facets widget initialization with various options
516
512
  template: `
517
513
  <div class="searchstax-facet-show-more-container">
518
514
  {{#showingAllFacets}}
519
- <div class="searchstax-facet-show-less-button searchstax-facet-show-button">less</div>
515
+ <div class="searchstax-facet-show-less-button searchstax-facet-show-button" tabindex="0">less</div>
520
516
  {{/showingAllFacets}}
521
517
  {{^showingAllFacets}}
522
- <div class="searchstax-facet-show-more-button searchstax-facet-show-button">more {{onShowMoreLessClick}}</div>
518
+ <div class="searchstax-facet-show-more-button searchstax-facet-show-button" tabindex="0">more {{onShowMoreLessClick}}</div>
523
519
  {{/showingAllFacets}}
524
520
  </div>
525
521
  `,
@@ -553,7 +549,7 @@ example of facets widget initialization with various options
553
549
  facetItemTemplate: {
554
550
  template: `
555
551
  <div class="searchstax-facet-input">
556
- <input type="checkbox" class="searchstax-facet-input-checkbox" {{#disabled}}disabled{{/disabled}} {{#isChecked}}checked{{/isChecked}}/>
552
+ <input type="checkbox" class="searchstax-facet-input-checkbox" {{#disabled}}disabled{{/disabled}} {{#isChecked}}checked{{/isChecked}} aria-label="{{value}} {{count}}" tabindex="0"/>
557
553
  </div>
558
554
  <div class="searchstax-facet-value-label">{{value}}</div>
559
555
  <div class="searchstax-facet-value-count">({{count}})</div>
@@ -662,7 +658,7 @@ searchstax.addRelatedSearchesWidget("searchstax-related-searches-container", {
662
658
  },
663
659
  relatedSearch: {
664
660
  template: `
665
- <span class="searchstax-related-search searchstax-related-search-item">
661
+ <span class="searchstax-related-search searchstax-related-search-item" tabindex="0">
666
662
  {{ related_search }}{{^last}}<span>,</span>{{/last}}
667
663
  </span>
668
664
  `,
@@ -751,7 +747,7 @@ searchstax.addSearchSortingWidget("search-sorting-container", {
751
747
  {{#searchExecuted}}
752
748
  {{#hasResultsOrExternalPromotions}}
753
749
  <div class="searchstax-sorting-container">
754
- <label class="searchstax-sorting-label" for="sort-by">Sort By</label>
750
+ <label class="searchstax-sorting-label" for="searchstax-search-order-select">Sort By</label>
755
751
  <select id="searchstax-search-order-select" class="searchstax-search-order-select" >
756
752
  {{#sortOptions}}
757
753
  <option value="{{key}}">