@salesforce/design-system-react 0.10.38 → 0.10.39

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.
Files changed (37) hide show
  1. package/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
  2. package/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
  3. package/components/combobox/combobox.jsx +20 -18
  4. package/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
  5. package/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
  6. package/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
  7. package/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
  8. package/lib/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
  9. package/lib/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
  10. package/lib/components/combobox/combobox.js +27 -23
  11. package/lib/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
  12. package/lib/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
  13. package/lib/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
  14. package/lib/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
  15. package/lib/package.json +1 -1
  16. package/module/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
  17. package/module/components/combobox/__tests__/combobox.browser-test.js +5 -6
  18. package/module/components/combobox/__tests__/combobox.browser-test.js.map +1 -1
  19. package/module/components/combobox/combobox.js +27 -23
  20. package/module/components/combobox/combobox.js.map +1 -1
  21. package/module/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
  22. package/module/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
  23. package/module/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
  24. package/module/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
  25. package/package.json +1 -1
  26. package/design-system-react-components.js +0 -63079
  27. package/design-system-react-components.js.map +0 -1
  28. package/design-system-react-components.min.js +0 -3
  29. package/design-system-react-components.min.js.LICENSE.txt +0 -83
  30. package/design-system-react-components.min.js.map +0 -1
  31. package/design-system-react.js +0 -73864
  32. package/design-system-react.js.map +0 -1
  33. package/design-system-react.min.js +0 -3
  34. package/design-system-react.min.js.LICENSE.txt +0 -83
  35. package/design-system-react.min.js.map +0 -1
  36. package/lib/design-system-react-components.min.js.LICENSE.txt +0 -83
  37. package/lib/design-system-react.min.js.LICENSE.txt +0 -83
@@ -225,17 +225,16 @@ describe('SLDSCombobox', function describeFunction() {
225
225
  destroyMountNode({ wrapper, mountNode });
226
226
  });
227
227
 
228
- it('has aria-haspopup, role is combobox, aria-expanded is false when closed, aria-expanded is true when open', function () {
228
+ it('has aria-haspopup, aria-expanded is false when closed, aria-expanded is true when open', function () {
229
229
  wrapper = mount(<DemoComponent multiple />, { attachTo: mountNode });
230
230
  const nodes = getNodes({ wrapper });
231
+ expect(nodes.combobox).attr('aria-haspopup', 'listbox');
231
232
  expect(nodes.combobox).attr('role', 'combobox');
232
- expect(nodes.input).attr('aria-haspopup', 'listbox');
233
- expect(nodes.input).attr('role', 'combobox');
234
233
  // closed
235
- expect(nodes.input).attr('aria-expanded', 'false');
234
+ expect(nodes.combobox).attr('aria-expanded', 'false');
236
235
  // open
237
236
  nodes.input.simulate('click', {});
238
- expect(nodes.input).attr('aria-expanded', 'true');
237
+ expect(nodes.combobox).attr('aria-expanded', 'true');
239
238
  });
240
239
 
241
240
  it('menu filters to second item, menu listbox menu item 2 aria-selected is true, input activedescendent has item 2 id, after pressing down arrow, enter selects item 2', function () {
@@ -1110,6 +1110,10 @@ class Combobox extends React.Component {
1110
1110
  )}
1111
1111
  // Not in ARIA 1.2 spec, temporary for SLDS styles
1112
1112
  role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1113
+ aria-expanded={this.getIsOpen()}
1114
+ aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1115
+ // used on menu's listbox
1116
+ aria-owns={this.getIsOpen() ? `${this.getId()}-listbox` : undefined} // eslint-disable-line jsx-a11y/aria-proptypes
1113
1117
  >
1114
1118
  <InnerInput
1115
1119
  aria-autocomplete="list"
@@ -1122,9 +1126,6 @@ class Combobox extends React.Component {
1122
1126
  : null
1123
1127
  }
1124
1128
  aria-describedby={this.getErrorId()}
1125
- aria-expanded={this.getIsOpen()}
1126
- aria-haspopup="listbox"
1127
- role="combobox"
1128
1129
  autoComplete="off"
1129
1130
  className="slds-combobox__input"
1130
1131
  containerProps={{
@@ -1154,6 +1155,7 @@ class Combobox extends React.Component {
1154
1155
  !!(props.predefinedOptionsOnly && this.state.activeOption)
1155
1156
  }
1156
1157
  required={props.required}
1158
+ role="textbox"
1157
1159
  value={
1158
1160
  props.predefinedOptionsOnly
1159
1161
  ? (this.state.activeOption && this.state.activeOption.label) ||
@@ -1250,6 +1252,8 @@ class Combobox extends React.Component {
1250
1252
  )}
1251
1253
  // Not in ARIA 1.2 spec, temporary for SLDS styles
1252
1254
  role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1255
+ aria-expanded={this.getIsOpen()}
1256
+ aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1253
1257
  >
1254
1258
  <InnerInput
1255
1259
  aria-autocomplete="list"
@@ -1262,9 +1266,6 @@ class Combobox extends React.Component {
1262
1266
  : null
1263
1267
  }
1264
1268
  aria-describedby={this.getErrorId()}
1265
- aria-expanded={this.getIsOpen()}
1266
- aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1267
- role="combobox"
1268
1269
  defaultValue={props.defaultValue}
1269
1270
  autoComplete="off"
1270
1271
  className="slds-combobox__input"
@@ -1294,6 +1295,7 @@ class Combobox extends React.Component {
1294
1295
  !!(props.predefinedOptionsOnly && this.state.activeOption)
1295
1296
  }
1296
1297
  required={props.required}
1298
+ role="textbox"
1297
1299
  value={
1298
1300
  props.predefinedOptionsOnly
1299
1301
  ? (this.state.activeOption && this.state.activeOption.label) ||
@@ -1351,6 +1353,8 @@ class Combobox extends React.Component {
1351
1353
  )}
1352
1354
  // Not in ARIA 1.2 spec, temporary for SLDS styles
1353
1355
  role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1356
+ aria-expanded={this.getIsOpen()}
1357
+ aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1354
1358
  >
1355
1359
  <InnerInput
1356
1360
  defaultValue={props.defaultValue}
@@ -1366,9 +1370,6 @@ class Combobox extends React.Component {
1366
1370
  : null
1367
1371
  }
1368
1372
  aria-describedby={this.getErrorId()}
1369
- aria-expanded={this.getIsOpen()}
1370
- aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1371
- role="combobox"
1372
1373
  autoComplete="off"
1373
1374
  className="slds-combobox__input"
1374
1375
  containerProps={{
@@ -1419,6 +1420,7 @@ class Combobox extends React.Component {
1419
1420
  !!props.selection.length
1420
1421
  }
1421
1422
  required={props.required}
1423
+ role="textbox"
1422
1424
  value={
1423
1425
  props.predefinedOptionsOnly
1424
1426
  ? (this.state.activeOption &&
@@ -1519,6 +1521,8 @@ class Combobox extends React.Component {
1519
1521
  )}
1520
1522
  // Not in ARIA 1.2 spec, temporary for SLDS styles
1521
1523
  role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1524
+ aria-expanded={this.getIsOpen()}
1525
+ aria-haspopup="dialog" // eslint-disable-line jsx-a11y/aria-proptypes
1522
1526
  >
1523
1527
  <Popover {...popoverProps}>
1524
1528
  <InnerInput
@@ -1527,9 +1531,6 @@ class Combobox extends React.Component {
1527
1531
  this.getIsOpen() ? `${this.getId()}-popover` : undefined
1528
1532
  }
1529
1533
  aria-describedby={this.getErrorId()}
1530
- aria-expanded={this.getIsOpen()}
1531
- aria-haspopup="dialog" // eslint-disable-line jsx-a11y/aria-proptypes
1532
- role="combobox"
1533
1534
  autoComplete="off"
1534
1535
  className="slds-combobox__input"
1535
1536
  containerProps={{
@@ -1555,6 +1556,7 @@ class Combobox extends React.Component {
1555
1556
  placeholder={labels.placeholder}
1556
1557
  readOnly
1557
1558
  required={props.required}
1559
+ role="textbox"
1558
1560
  value={props.value}
1559
1561
  />
1560
1562
  </Popover>
@@ -1605,6 +1607,8 @@ class Combobox extends React.Component {
1605
1607
  )}
1606
1608
  // Not in ARIA 1.2 spec, temporary for SLDS styles
1607
1609
  role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1610
+ aria-expanded={this.getIsOpen()}
1611
+ aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1608
1612
  >
1609
1613
  <InnerInput
1610
1614
  defaultValue={props.defaultValue}
@@ -1620,9 +1624,6 @@ class Combobox extends React.Component {
1620
1624
  : null
1621
1625
  }
1622
1626
  aria-describedby={this.getErrorId()}
1623
- aria-expanded={this.getIsOpen()}
1624
- aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1625
- role="combobox"
1626
1627
  autoComplete="off"
1627
1628
  className="slds-combobox__input"
1628
1629
  containerProps={{
@@ -1648,6 +1649,7 @@ class Combobox extends React.Component {
1648
1649
  placeholder={labels.placeholderReadOnly}
1649
1650
  readOnly
1650
1651
  required={props.required}
1652
+ role="textbox"
1651
1653
  value={value}
1652
1654
  {...userDefinedProps.input}
1653
1655
  />
@@ -1724,6 +1726,8 @@ class Combobox extends React.Component {
1724
1726
  )}
1725
1727
  // Not in ARIA 1.2 spec, temporary for SLDS styles
1726
1728
  role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1729
+ aria-expanded={this.getIsOpen()}
1730
+ aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1727
1731
  >
1728
1732
  <InnerInput
1729
1733
  defaultValue={props.defaultValue}
@@ -1739,9 +1743,6 @@ class Combobox extends React.Component {
1739
1743
  : null
1740
1744
  }
1741
1745
  aria-describedby={this.getErrorId()}
1742
- aria-expanded={this.getIsOpen()}
1743
- aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1744
- role="combobox"
1745
1746
  autoComplete="off"
1746
1747
  className="slds-combobox__input"
1747
1748
  containerProps={{
@@ -1768,6 +1769,7 @@ class Combobox extends React.Component {
1768
1769
  placeholder={labels.placeholderReadOnly}
1769
1770
  readOnly
1770
1771
  required={props.required}
1772
+ role="textbox"
1771
1773
  value={inputValue}
1772
1774
  {...userDefinedProps.input}
1773
1775
  />
@@ -170,6 +170,8 @@ exports[`Datepicker
170
170
  className="slds-combobox_container"
171
171
  >
172
172
  <div
173
+ aria-expanded={false}
174
+ aria-haspopup="listbox"
173
175
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
174
176
  role="combobox"
175
177
  >
@@ -180,8 +182,6 @@ exports[`Datepicker
180
182
  <input
181
183
  aria-activedescendant={null}
182
184
  aria-autocomplete="list"
183
- aria-expanded={false}
184
- aria-haspopup="listbox"
185
185
  autoComplete="off"
186
186
  className="slds-input slds-combobox__input"
187
187
  disabled={false}
@@ -194,7 +194,7 @@ exports[`Datepicker
194
194
  placeholder="Select an Option"
195
195
  readOnly={true}
196
196
  required={false}
197
- role="combobox"
197
+ role="textbox"
198
198
  type="text"
199
199
  value="2007"
200
200
  />
@@ -1034,6 +1034,8 @@ exports[`Datepicker
1034
1034
  className="slds-combobox_container"
1035
1035
  >
1036
1036
  <div
1037
+ aria-expanded={false}
1038
+ aria-haspopup="listbox"
1037
1039
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
1038
1040
  role="combobox"
1039
1041
  >
@@ -1044,8 +1046,6 @@ exports[`Datepicker
1044
1046
  <input
1045
1047
  aria-activedescendant={null}
1046
1048
  aria-autocomplete="list"
1047
- aria-expanded={false}
1048
- aria-haspopup="listbox"
1049
1049
  autoComplete="off"
1050
1050
  className="slds-input slds-combobox__input"
1051
1051
  disabled={false}
@@ -1058,7 +1058,7 @@ exports[`Datepicker
1058
1058
  placeholder="Select an Option"
1059
1059
  readOnly={true}
1060
1060
  required={false}
1061
- role="combobox"
1061
+ role="textbox"
1062
1062
  type="text"
1063
1063
  value="2007"
1064
1064
  />
@@ -1897,6 +1897,8 @@ exports[`Datepicker
1897
1897
  className="slds-combobox_container"
1898
1898
  >
1899
1899
  <div
1900
+ aria-expanded={false}
1901
+ aria-haspopup="listbox"
1900
1902
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
1901
1903
  role="combobox"
1902
1904
  >
@@ -1907,8 +1909,6 @@ exports[`Datepicker
1907
1909
  <input
1908
1910
  aria-activedescendant={null}
1909
1911
  aria-autocomplete="list"
1910
- aria-expanded={false}
1911
- aria-haspopup="listbox"
1912
1912
  autoComplete="off"
1913
1913
  className="slds-input slds-combobox__input"
1914
1914
  disabled={false}
@@ -1921,7 +1921,7 @@ exports[`Datepicker
1921
1921
  placeholder="Select an Option"
1922
1922
  readOnly={true}
1923
1923
  required={false}
1924
- role="combobox"
1924
+ role="textbox"
1925
1925
  type="text"
1926
1926
  value="2014"
1927
1927
  />
@@ -2757,6 +2757,8 @@ exports[`Datepicker Default DOM Snapshot 1`] = `
2757
2757
  className="slds-combobox_container"
2758
2758
  >
2759
2759
  <div
2760
+ aria-expanded={false}
2761
+ aria-haspopup="listbox"
2760
2762
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
2761
2763
  role="combobox"
2762
2764
  >
@@ -2767,8 +2769,6 @@ exports[`Datepicker Default DOM Snapshot 1`] = `
2767
2769
  <input
2768
2770
  aria-activedescendant={null}
2769
2771
  aria-autocomplete="list"
2770
- aria-expanded={false}
2771
- aria-haspopup="listbox"
2772
2772
  autoComplete="off"
2773
2773
  className="slds-input slds-combobox__input"
2774
2774
  disabled={false}
@@ -2781,7 +2781,7 @@ exports[`Datepicker Default DOM Snapshot 1`] = `
2781
2781
  placeholder="Select an Option"
2782
2782
  readOnly={true}
2783
2783
  required={false}
2784
- role="combobox"
2784
+ role="textbox"
2785
2785
  type="text"
2786
2786
  value="2014"
2787
2787
  />
@@ -3485,8 +3485,8 @@ exports[`Datepicker Default HTML Snapshot 1`] = `
3485
3485
  <div class=\\"slds-form-element\\"><label class=\\"slds-form-element__label slds-assistive-text\\" for=\\"sample-datepicker-year-picklist\\">Year</label>
3486
3486
  <div class=\\"slds-form-element__control\\">
3487
3487
  <div class=\\"slds-combobox_container\\">
3488
- <div class=\\"slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none\\" role=\\"combobox\\">
3489
- <div class=\\"slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right\\" role=\\"none\\"><input type=\\"text\\" autoComplete=\\"off\\" class=\\"slds-input slds-combobox__input\\" id=\\"sample-datepicker-year-picklist\\" placeholder=\\"Select an Option\\" readonly=\\"\\" role=\\"combobox\\" aria-autocomplete=\\"list\\" aria-expanded=\\"false\\" aria-haspopup=\\"listbox\\" value=\\"2014\\" /><span class=\\"slds-icon_container slds-input__icon slds-input__icon_right\\"><svg aria-hidden=\\"true\\" class=\\"slds-icon slds-icon_x-small slds-icon-text-default\\">
3488
+ <div class=\\"slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none\\" role=\\"combobox\\" aria-expanded=\\"false\\" aria-haspopup=\\"listbox\\">
3489
+ <div class=\\"slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right\\" role=\\"none\\"><input type=\\"text\\" autoComplete=\\"off\\" class=\\"slds-input slds-combobox__input\\" id=\\"sample-datepicker-year-picklist\\" placeholder=\\"Select an Option\\" readonly=\\"\\" role=\\"textbox\\" aria-autocomplete=\\"list\\" value=\\"2014\\" /><span class=\\"slds-icon_container slds-input__icon slds-input__icon_right\\"><svg aria-hidden=\\"true\\" class=\\"slds-icon slds-icon_x-small slds-icon-text-default\\">
3490
3490
  <use href=\\"/assets/icons/utility-sprite/svg/symbols.svg#down\\"></use>
3491
3491
  </svg></span></div>
3492
3492
  </div>
@@ -3723,6 +3723,8 @@ exports[`ErrorPicker 1`] = `
3723
3723
  className="slds-combobox_container"
3724
3724
  >
3725
3725
  <div
3726
+ aria-expanded={false}
3727
+ aria-haspopup="listbox"
3726
3728
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
3727
3729
  role="combobox"
3728
3730
  >
@@ -3733,8 +3735,6 @@ exports[`ErrorPicker 1`] = `
3733
3735
  <input
3734
3736
  aria-activedescendant={null}
3735
3737
  aria-autocomplete="list"
3736
- aria-expanded={false}
3737
- aria-haspopup="listbox"
3738
3738
  autoComplete="off"
3739
3739
  className="slds-input slds-combobox__input"
3740
3740
  disabled={false}
@@ -3747,7 +3747,7 @@ exports[`ErrorPicker 1`] = `
3747
3747
  placeholder="Select an Option"
3748
3748
  readOnly={true}
3749
3749
  required={false}
3750
- role="combobox"
3750
+ role="textbox"
3751
3751
  type="text"
3752
3752
  value="2014"
3753
3753
  />