@pingux/astro 1.31.0-alpha.1 → 1.31.0-alpha.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.
@@ -229,6 +229,7 @@ var TabPicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
229
229
  ref: menuRef
230
230
  }, (0, _map["default"])(items).call(items, function (tab) {
231
231
  return (0, _react2.jsx)(_collections.Item, {
232
+ role: tab.role,
232
233
  key: tab.key
233
234
  }, tab.name);
234
235
  })));
@@ -298,11 +298,13 @@ var WithList = function WithList() {
298
298
  list: [{
299
299
  key: 'tab1list',
300
300
  name: 'Tab 1 list',
301
- children: 'Tab 1 from list'
301
+ children: 'Tab 1 from list',
302
+ role: 'listitem'
302
303
  }, {
303
304
  key: 'tab2list',
304
305
  name: 'Tab 2 list',
305
- children: 'Tab 2 from list'
306
+ children: 'Tab 2 from list',
307
+ role: 'listitem'
306
308
  }]
307
309
  }]);
308
310
  return (0, _react2.jsx)(_Tabs["default"], {
@@ -63,11 +63,13 @@ var tabsWithList = [{
63
63
  list: [{
64
64
  key: 'tab1list',
65
65
  name: 'Tab 1 list',
66
- children: 'Tab 1 from list'
66
+ children: 'Tab 1 from list',
67
+ role: 'listitem'
67
68
  }, {
68
69
  key: 'tab2list',
69
70
  name: 'Tab 2 list',
70
- children: 'Tab 2 from list'
71
+ children: 'Tab 2 from list',
72
+ role: 'listitem'
71
73
  }]
72
74
  }];
73
75
  var defaultProps = {
@@ -545,7 +547,7 @@ test('will render tab with list if provided', /*#__PURE__*/(0, _asyncToGenerator
545
547
 
546
548
  expect(_testWrapper.screen.queryByRole('menu')).toBeInTheDocument();
547
549
  testTabPanel(0);
548
- menuItems = _testWrapper.screen.queryAllByRole('menuitemradio');
550
+ menuItems = _testWrapper.screen.queryAllByRole('listitem');
549
551
  expect(menuItems).toHaveLength(tabsWithList[1].list.length);
550
552
  expect(menuItems[0]).not.toHaveFocus();
551
553
 
@@ -596,7 +598,7 @@ test('tab list is accessible via keyboard', function () {
596
598
  expect(_testWrapper.screen.queryByRole('menu')).toBeInTheDocument();
597
599
  testTabPanel(0);
598
600
 
599
- var menuItems = _testWrapper.screen.queryAllByRole('menuitemradio');
601
+ var menuItems = _testWrapper.screen.queryAllByRole('listitem');
600
602
 
601
603
  expect(menuItems).toHaveLength(tabsWithList[1].list.length);
602
604
  expect(menuItems[0]).toHaveFocus();
@@ -190,6 +190,7 @@ var TabPicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
190
190
  ref: menuRef
191
191
  }, _mapInstanceProperty(items).call(items, function (tab) {
192
192
  return ___EmotionJSX(Tab, {
193
+ role: tab.role,
193
194
  key: tab.key
194
195
  }, tab.name);
195
196
  })));
@@ -235,11 +235,13 @@ export var WithList = function WithList() {
235
235
  list: [{
236
236
  key: 'tab1list',
237
237
  name: 'Tab 1 list',
238
- children: 'Tab 1 from list'
238
+ children: 'Tab 1 from list',
239
+ role: 'listitem'
239
240
  }, {
240
241
  key: 'tab2list',
241
242
  name: 'Tab 2 list',
242
- children: 'Tab 2 from list'
243
+ children: 'Tab 2 from list',
244
+ role: 'listitem'
243
245
  }]
244
246
  }]);
245
247
 
@@ -43,11 +43,13 @@ var tabsWithList = [{
43
43
  list: [{
44
44
  key: 'tab1list',
45
45
  name: 'Tab 1 list',
46
- children: 'Tab 1 from list'
46
+ children: 'Tab 1 from list',
47
+ role: 'listitem'
47
48
  }, {
48
49
  key: 'tab2list',
49
50
  name: 'Tab 2 list',
50
- children: 'Tab 2 from list'
51
+ children: 'Tab 2 from list',
52
+ role: 'listitem'
51
53
  }]
52
54
  }];
53
55
  var defaultProps = {
@@ -495,7 +497,7 @@ test('will render tab with list if provided', /*#__PURE__*/_asyncToGenerator( /*
495
497
  userEvent.click(menuBtn);
496
498
  expect(screen.queryByRole('menu')).toBeInTheDocument();
497
499
  testTabPanel(0);
498
- menuItems = screen.queryAllByRole('menuitemradio');
500
+ menuItems = screen.queryAllByRole('listitem');
499
501
  expect(menuItems).toHaveLength(tabsWithList[1].list.length);
500
502
  expect(menuItems[0]).not.toHaveFocus();
501
503
  userEvent.click(menuItems[0]);
@@ -538,7 +540,7 @@ test('tab list is accessible via keyboard', function () {
538
540
  });
539
541
  expect(screen.queryByRole('menu')).toBeInTheDocument();
540
542
  testTabPanel(0);
541
- var menuItems = screen.queryAllByRole('menuitemradio');
543
+ var menuItems = screen.queryAllByRole('listitem');
542
544
  expect(menuItems).toHaveLength(tabsWithList[1].list.length);
543
545
  expect(menuItems[0]).toHaveFocus();
544
546
  fireEvent.keyDown(menuItems[0], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.31.0-alpha.1",
3
+ "version": "1.31.0-alpha.2",
4
4
  "description": "PingUX themeable React component library",
5
5
  "repository": {
6
6
  "type": "git",