@algolia/autocomplete-js 1.17.0 → 1.17.2

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.
@@ -162,6 +162,7 @@ export function autocomplete(options) {
162
162
  return function () {
163
163
  if (panelContainerElement.contains(panelElement)) {
164
164
  panelContainerElement.removeChild(panelElement);
165
+ panelContainerElement.classList.remove('aa-Detached');
165
166
  }
166
167
  };
167
168
  });
@@ -53,9 +53,13 @@ export function createAutocompleteDom(_ref) {
53
53
  environment: environment
54
54
  })]
55
55
  });
56
+ // @MAJOR Remove the label wrapper for the submit button.
57
+ // The submit button is sufficient for accessibility purposes, and
58
+ // wrapping it with the label actually makes it less accessible (see CR-6077).
56
59
  var label = createDomElement('label', _objectSpread({
57
60
  class: classNames.label,
58
- children: [submitButton]
61
+ children: [submitButton],
62
+ ariaLabel: translations.submitButtonTitle
59
63
  }, labelProps));
60
64
  var clearButton = createDomElement('button', {
61
65
  class: classNames.clearButton,
@@ -1,4 +1,4 @@
1
- /*! @algolia/autocomplete-js 1.17.0 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
1
+ /*! @algolia/autocomplete-js 1.17.2 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -347,7 +347,7 @@
347
347
  return undefined;
348
348
  }
349
349
 
350
- var version = '1.17.0';
350
+ var version = '1.17.2';
351
351
 
352
352
  var userAgents$1 = [{
353
353
  segment: 'autocomplete-core',
@@ -3795,9 +3795,13 @@
3795
3795
  environment: environment
3796
3796
  })]
3797
3797
  });
3798
+ // @MAJOR Remove the label wrapper for the submit button.
3799
+ // The submit button is sufficient for accessibility purposes, and
3800
+ // wrapping it with the label actually makes it less accessible (see CR-6077).
3798
3801
  var label = createDomElement('label', _objectSpread2({
3799
3802
  class: classNames.label,
3800
- children: [submitButton]
3803
+ children: [submitButton],
3804
+ ariaLabel: translations.submitButtonTitle
3801
3805
  }, labelProps));
3802
3806
  var clearButton = createDomElement('button', {
3803
3807
  class: classNames.clearButton,
@@ -5046,6 +5050,7 @@
5046
5050
  return function () {
5047
5051
  if (panelContainerElement.contains(panelElement)) {
5048
5052
  panelContainerElement.removeChild(panelElement);
5053
+ panelContainerElement.classList.remove('aa-Detached');
5049
5054
  }
5050
5055
  };
5051
5056
  });