@atlaskit/react-select 1.5.0 → 1.5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/react-select
2
2
 
3
+ ## 1.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#174296](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/174296)
8
+ [`b9f79083be192`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b9f79083be192) -
9
+ Adding extra semantics to listbox
10
+
3
11
  ## 1.5.0
4
12
 
5
13
  ### Minor Changes
@@ -1641,6 +1641,7 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1641
1641
  onBottomArrive: onMenuScrollToBottom,
1642
1642
  lockEnabled: menuShouldBlockScroll
1643
1643
  }, function (scrollTargetRef) {
1644
+ var _this4$inputRef;
1644
1645
  return /*#__PURE__*/_react.default.createElement(MenuList, (0, _extends2.default)({}, commonProps, {
1645
1646
  innerRef: function innerRef(instance) {
1646
1647
  _this4.getMenuListRef(instance);
@@ -1652,7 +1653,7 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1652
1653
  id: _this4.getElementId('listbox')
1653
1654
  }, (0, _platformFeatureFlags.fg)('design_system_select-a11y-improvement') && {
1654
1655
  'aria-label': label,
1655
- 'aria-labelledby': "".concat(labelId || _this4.getElementId('input'), " ").concat(commonProps.isMulti && (0, _helpers.isSafari)() ? _this4.getElementId('multi-message') : '')
1656
+ 'aria-labelledby': "".concat(labelId || ((_this4$inputRef = _this4.inputRef) === null || _this4$inputRef === void 0 ? void 0 : _this4$inputRef.id) || _this4.getElementId('input'), " ").concat(commonProps.isMulti && (0, _helpers.isSafari)() ? _this4.getElementId('multi-message') : '')
1656
1657
  }),
1657
1658
  isLoading: isLoading,
1658
1659
  maxHeight: maxHeight,
@@ -1670,25 +1670,28 @@ export default class Select extends Component {
1670
1670
  onTopArrive: onMenuScrollToTop,
1671
1671
  onBottomArrive: onMenuScrollToBottom,
1672
1672
  lockEnabled: menuShouldBlockScroll
1673
- }, scrollTargetRef => /*#__PURE__*/React.createElement(MenuList, _extends({}, commonProps, {
1674
- innerRef: instance => {
1675
- this.getMenuListRef(instance);
1676
- scrollTargetRef(instance);
1677
- },
1678
- innerProps: {
1679
- role: 'listbox',
1680
- 'aria-multiselectable': (this.isVoiceOver || !commonProps.isMulti) && fg('design_system_select-a11y-improvement') ? undefined : commonProps.isMulti,
1681
- id: this.getElementId('listbox'),
1682
- // add aditional label on listbox when ff is on
1683
- ...(fg('design_system_select-a11y-improvement') && {
1684
- 'aria-label': label,
1685
- 'aria-labelledby': `${labelId || this.getElementId('input')} ${commonProps.isMulti && isSafari() ? this.getElementId('multi-message') : ''}`
1686
- })
1687
- },
1688
- isLoading: isLoading,
1689
- maxHeight: maxHeight,
1690
- focusedOption: focusedOption
1691
- }), menuUI))));
1673
+ }, scrollTargetRef => {
1674
+ var _this$inputRef;
1675
+ return /*#__PURE__*/React.createElement(MenuList, _extends({}, commonProps, {
1676
+ innerRef: instance => {
1677
+ this.getMenuListRef(instance);
1678
+ scrollTargetRef(instance);
1679
+ },
1680
+ innerProps: {
1681
+ role: 'listbox',
1682
+ 'aria-multiselectable': (this.isVoiceOver || !commonProps.isMulti) && fg('design_system_select-a11y-improvement') ? undefined : commonProps.isMulti,
1683
+ id: this.getElementId('listbox'),
1684
+ // add aditional label on listbox when ff is on
1685
+ ...(fg('design_system_select-a11y-improvement') && {
1686
+ 'aria-label': label,
1687
+ 'aria-labelledby': `${labelId || ((_this$inputRef = this.inputRef) === null || _this$inputRef === void 0 ? void 0 : _this$inputRef.id) || this.getElementId('input')} ${commonProps.isMulti && isSafari() ? this.getElementId('multi-message') : ''}`
1688
+ })
1689
+ },
1690
+ isLoading: isLoading,
1691
+ maxHeight: maxHeight,
1692
+ focusedOption: focusedOption
1693
+ }), menuUI);
1694
+ })));
1692
1695
 
1693
1696
  // positioning behaviour is almost identical for portalled and fixed,
1694
1697
  // so we use the same component. the actual portalling logic is forked
@@ -1632,6 +1632,7 @@ var Select = /*#__PURE__*/function (_Component) {
1632
1632
  onBottomArrive: onMenuScrollToBottom,
1633
1633
  lockEnabled: menuShouldBlockScroll
1634
1634
  }, function (scrollTargetRef) {
1635
+ var _this4$inputRef;
1635
1636
  return /*#__PURE__*/React.createElement(MenuList, _extends({}, commonProps, {
1636
1637
  innerRef: function innerRef(instance) {
1637
1638
  _this4.getMenuListRef(instance);
@@ -1643,7 +1644,7 @@ var Select = /*#__PURE__*/function (_Component) {
1643
1644
  id: _this4.getElementId('listbox')
1644
1645
  }, fg('design_system_select-a11y-improvement') && {
1645
1646
  'aria-label': label,
1646
- 'aria-labelledby': "".concat(labelId || _this4.getElementId('input'), " ").concat(commonProps.isMulti && isSafari() ? _this4.getElementId('multi-message') : '')
1647
+ 'aria-labelledby': "".concat(labelId || ((_this4$inputRef = _this4.inputRef) === null || _this4$inputRef === void 0 ? void 0 : _this4$inputRef.id) || _this4.getElementId('input'), " ").concat(commonProps.isMulti && isSafari() ? _this4.getElementId('multi-message') : '')
1647
1648
  }),
1648
1649
  isLoading: isLoading,
1649
1650
  maxHeight: maxHeight,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "A forked version of react-select to only be used in atlaskit/select",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",