carbon-react 104.24.0 → 104.24.1

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.
@@ -113,9 +113,9 @@ const Accordion = /*#__PURE__*/_react.default.forwardRef(({
113
113
  isExpanded: isExpanded,
114
114
  buttonHeading: buttonHeading,
115
115
  buttonWidth: buttonWidth,
116
- hasButtonProps: buttonHeading && headerSpacing
116
+ hasButtonProps: buttonHeading && headerSpacing,
117
+ role: "button"
117
118
  }, buttonHeading && {
118
- role: "button",
119
119
  p: 0
120
120
  }, headerSpacing), /*#__PURE__*/_react.default.createElement(_accordion.StyledAccordionHeadingsContainer, {
121
121
  "data-element": "accordion-headings-container",
@@ -34,7 +34,7 @@ declare namespace DialogFullScreen {
34
34
  */
35
35
  "aria-label": PropTypes.Requireable<string>;
36
36
  /**
37
- * Prop to specify the aria-labeledby property of the DialogFullscreen component
37
+ * Prop to specify the aria-labelledby property of the DialogFullscreen component
38
38
  * To be used when the title prop is a custom React Node,
39
39
  * or the component is labelled by an internal element other than the title.
40
40
  */
@@ -71,7 +71,7 @@ declare namespace DialogFullScreen {
71
71
  contentRef: PropTypes.Requireable<((...args: any[]) => any) | PropTypes.InferProps<{
72
72
  current: PropTypes.Requireable<Element>;
73
73
  }>>;
74
- /** The ARIA role to be applied to the DialogFulscreen container */
74
+ /** The ARIA role to be applied to the DialogFullscreen container */
75
75
  role: PropTypes.Requireable<string>;
76
76
  };
77
77
  }
@@ -111,7 +111,7 @@ const DialogFullScreen = ({
111
111
  focusFirstElement: focusFirstElement,
112
112
  wrapperRef: dialogRef
113
113
  }, /*#__PURE__*/_react.default.createElement(_dialogFullScreen.default, _extends({
114
- "aria-modal": true
114
+ "aria-modal": role === "dialog" ? true : undefined
115
115
  }, ariaProps, {
116
116
  ref: dialogRef,
117
117
  "data-element": "dialog-full-screen",
@@ -140,7 +140,7 @@ DialogFullScreen.propTypes = {
140
140
  "aria-label": _propTypes.default.string,
141
141
 
142
142
  /**
143
- * Prop to specify the aria-labeledby property of the DialogFullscreen component
143
+ * Prop to specify the aria-labelledby property of the DialogFullscreen component
144
144
  * To be used when the title prop is a custom React Node,
145
145
  * or the component is labelled by an internal element other than the title.
146
146
  */
@@ -192,7 +192,7 @@ DialogFullScreen.propTypes = {
192
192
  current: _propTypes.default.instanceOf(Element)
193
193
  })]),
194
194
 
195
- /** The ARIA role to be applied to the DialogFulscreen container */
195
+ /** The ARIA role to be applied to the DialogFullscreen container */
196
196
  role: _propTypes.default.string
197
197
  };
198
198
  var _default = DialogFullScreen;
@@ -10,7 +10,7 @@ export interface DialogFullScreenProps extends ModalProps {
10
10
  */
11
11
  "aria-label"?: string;
12
12
  /**
13
- * Prop to specify the aria-labeledby property of the DialogFullscreen component
13
+ * Prop to specify the aria-labelledby property of the DialogFullscreen component
14
14
  * To be used when the title prop is a custom React Node,
15
15
  * or the component is labelled by an internal element other than the title.
16
16
  */
@@ -39,7 +39,7 @@ export interface DialogFullScreenProps extends ModalProps {
39
39
  subtitle?: string;
40
40
  /** Title displayed at top of dialog */
41
41
  title?: React.ReactNode;
42
- /** The ARIA role to be applied to the DialogFulscreen container */
42
+ /** The ARIA role to be applied to the DialogFullscreen container */
43
43
  role?: string;
44
44
  }
45
45
 
@@ -147,7 +147,6 @@ const Drawer = ({
147
147
  expandedWidth: expandedWidth,
148
148
  animationDuration: animationDuration,
149
149
  className: getClassNames(),
150
- "aria-expanded": isExpanded ? "true" : "false",
151
150
  ref: drawerSidebarContentRef,
152
151
  backgroundColor: backgroundColor
153
152
  }, stickyHeader && /*#__PURE__*/_react.default.createElement(_drawer.StyledSidebarHeader, {
@@ -157,7 +156,7 @@ const Drawer = ({
157
156
  id: sidebarId,
158
157
  isExpanded: isExpanded,
159
158
  role: "navigation",
160
- overflowY: "auto",
159
+ overflowY: isExpanded ? "auto" : undefined,
161
160
  scrollVariant: "light",
162
161
  ref: scrollableContentRef
163
162
  }, /*#__PURE__*/_react.default.createElement(DrawerSidebarContext.Provider, {
@@ -36,12 +36,13 @@ declare namespace PopoverContainer {
36
36
  export { position_1 as position };
37
37
  const shouldCoverButton_1: boolean;
38
38
  export { shouldCoverButton_1 as shouldCoverButton };
39
- export function renderOpenComponent_1({ tabIndex, onClick, dataElement, ref, ariaLabel, }: {
39
+ export function renderOpenComponent_1({ tabIndex, onClick, dataElement, ref, ariaLabel, id, }: {
40
40
  tabIndex: any;
41
41
  onClick: any;
42
42
  dataElement: any;
43
43
  ref: any;
44
44
  ariaLabel: any;
45
+ id: any;
45
46
  }): JSX.Element;
46
47
  export { renderOpenComponent_1 as renderOpenComponent };
47
48
  export function renderCloseComponent_1({ dataElement, tabIndex, onClick, ref, ariaLabel, }: {
@@ -78,7 +78,8 @@ const PopoverContainer = ({
78
78
  dataElement: "popover-container-open-component",
79
79
  onClick: handleOpenButtonClick,
80
80
  ref: openButtonRef,
81
- ariaLabel: openButtonAriaLabel || title
81
+ ariaLabel: openButtonAriaLabel || title,
82
+ id: isOpen ? undefined : popoverContainerId
82
83
  };
83
84
  const renderCloseComponentProps = {
84
85
  dataElement: "popover-container-close-component",
@@ -90,7 +91,7 @@ const PopoverContainer = ({
90
91
  return /*#__PURE__*/_react.default.createElement(_popoverContainer.PopoverContainerWrapperStyle, {
91
92
  "data-component": "popover-container",
92
93
  role: "region",
93
- "aria-labelledby": isOpen ? popoverContainerId : undefined
94
+ "aria-labelledby": popoverContainerId
94
95
  }, renderOpenComponent(renderOpenComponentProps), /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.Transition, {
95
96
  in: isOpen,
96
97
  timeout: {
@@ -173,7 +174,8 @@ PopoverContainer.defaultProps = {
173
174
  onClick,
174
175
  dataElement,
175
176
  ref,
176
- ariaLabel
177
+ ariaLabel,
178
+ id
177
179
  /* eslint-enable react/prop-types */
178
180
 
179
181
  }) => /*#__PURE__*/_react.default.createElement(_popoverContainer.PopoverContainerOpenIcon, {
@@ -182,7 +184,8 @@ PopoverContainer.defaultProps = {
182
184
  "data-element": dataElement,
183
185
  ref: ref,
184
186
  "aria-label": ariaLabel,
185
- "aria-haspopup": true
187
+ "aria-haspopup": true,
188
+ id: id
186
189
  }, /*#__PURE__*/_react.default.createElement(_icon.default, {
187
190
  type: "settings"
188
191
  })),
@@ -106,7 +106,7 @@ const Textbox = ({
106
106
  labelHelp,
107
107
  fieldHelp
108
108
  });
109
- const labelId = externalLabelId || internalLabelId;
109
+ const labelId = label ? externalLabelId || internalLabelId : "";
110
110
  return /*#__PURE__*/_react.default.createElement(_tooltipProvider.TooltipProvider, {
111
111
  helpAriaLabel: helpAriaLabel,
112
112
  tooltipPosition: tooltipPosition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.24.0",
3
+ "version": "104.24.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {