@moda/om 21.6.4 → 21.6.6

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/dist/index.cjs.js CHANGED
@@ -7528,19 +7528,17 @@ var Checkbox = function Checkbox(_ref) {
7528
7528
  }, [onChange, checked]);
7529
7529
  return /*#__PURE__*/React.createElement("label", {
7530
7530
  htmlFor: id,
7531
- tabIndex: 0,
7532
7531
  className: classNames('Checkbox', className, {
7533
7532
  'Checkbox--disabled': disabled
7534
7533
  }),
7535
7534
  "data-test-id": dataTestId && "".concat(dataTestId, "--label")
7536
7535
  }, /*#__PURE__*/React.createElement("span", {
7537
- tabIndex: -1,
7536
+ "aria-hidden": "true",
7538
7537
  className: classNames('Checkbox__indicator', {
7539
7538
  'Checkbox__indicator--disabled': disabled
7540
7539
  })
7541
7540
  }, isChecked && /*#__PURE__*/React.createElement(React.Fragment, null, checkIcon === 'checkmark' && /*#__PURE__*/React.createElement(Checkmark16, CHECKED_ITEM_PROPS), checkIcon === 'circle' && /*#__PURE__*/React.createElement(Circle12, CHECKED_ITEM_PROPS))), /*#__PURE__*/React.createElement("input", _extends$1({
7542
7541
  id: id,
7543
- tabIndex: -1,
7544
7542
  className: "Checkbox__input",
7545
7543
  type: "checkbox",
7546
7544
  checked: isChecked,
@@ -7663,10 +7661,13 @@ var Modal = function Modal(_ref) {
7663
7661
  children = _ref.children,
7664
7662
  onClose = _ref.onClose,
7665
7663
  shards = _ref.shards,
7666
- autoFocus = _ref.autoFocus,
7664
+ _ref$autoFocus = _ref.autoFocus,
7665
+ autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
7667
7666
  rest = _objectWithoutProperties(_ref, _excluded$u);
7668
7667
  return /*#__PURE__*/React.createElement("div", _extends$1({
7669
- className: classNames('Modal', className)
7668
+ className: classNames('Modal', className),
7669
+ role: "dialog",
7670
+ "aria-modal": "true"
7670
7671
  }, rest), /*#__PURE__*/React.createElement(FocusOn, {
7671
7672
  autoFocus: autoFocus,
7672
7673
  shards: shards,
@@ -7794,12 +7795,15 @@ var Dialog = function Dialog(_ref) {
7794
7795
  actions = _ref.actions,
7795
7796
  contentClassName = _ref.contentClassName,
7796
7797
  rest = _objectWithoutProperties(_ref, _excluded$p);
7798
+ var titleId = React.useId();
7797
7799
  return /*#__PURE__*/React.createElement(ModalOverlay, _extends$1({
7798
- contentClassName: classNames('Dialog', contentClassName)
7800
+ contentClassName: classNames('Dialog', contentClassName),
7801
+ "aria-labelledby": title ? titleId : undefined
7799
7802
  }, rest), /*#__PURE__*/React.createElement(Stack, {
7800
7803
  className: "Dialog__content",
7801
7804
  space: 6
7802
7805
  }, title && /*#__PURE__*/React.createElement(Text, {
7806
+ id: titleId,
7803
7807
  treatment: "h5"
7804
7808
  }, title), message && /*#__PURE__*/React.createElement(Text, null, message), actions && /*#__PURE__*/React.createElement(Stack, {
7805
7809
  direction: "horizontal",