@salesforce/design-system-react 0.10.38 → 0.10.42
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/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
- package/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
- package/components/combobox/combobox.d.ts +11 -11
- package/components/combobox/combobox.jsx +20 -18
- package/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
- package/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
- package/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
- package/components/menu-dropdown/menu-dropdown.jsx +5 -8
- package/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
- package/components/setup-assistant.d.ts +1 -1
- package/icons/standard/account_info.js +5 -0
- package/icons/standard/asset_audit.js +5 -0
- package/icons/standard/asset_warranty.js +1 -1
- package/icons/standard/attach.js +5 -0
- package/icons/standard/budget.js +5 -0
- package/icons/standard/budget_allocation.js +5 -0
- package/icons/standard/change_request.js +5 -0
- package/icons/standard/code_set.js +5 -0
- package/icons/standard/code_set_bundle.js +5 -0
- package/icons/standard/contract_payment.js +5 -0
- package/icons/standard/coupon_codes.js +5 -0
- package/icons/standard/discounts.js +5 -0
- package/icons/standard/field_sales.js +5 -0
- package/icons/standard/filter_criteria_rule.js +5 -0
- package/icons/standard/historical_adherence.js +5 -0
- package/icons/standard/identifier.js +5 -0
- package/icons/standard/incident.js +5 -0
- package/icons/standard/index.js +43 -7
- package/icons/standard/med_rec_recommendation.js +5 -0
- package/icons/standard/med_rec_statement_recommendation.js +5 -0
- package/icons/standard/medication.js +5 -0
- package/icons/standard/medication_dispense.js +5 -0
- package/icons/standard/medication_reconciliation.js +5 -0
- package/icons/standard/medication_statement.js +5 -0
- package/icons/standard/network_contract.js +5 -0
- package/icons/standard/patient_medication_dosage.js +5 -0
- package/icons/standard/person_language.js +5 -0
- package/icons/standard/person_name.js +5 -0
- package/icons/standard/problem.js +5 -0
- package/icons/standard/product_consumed_state.js +5 -0
- package/icons/standard/product_transfer.js +1 -1
- package/icons/standard/product_transfer_state.js +5 -0
- package/icons/standard/promotion_segments.js +5 -0
- package/icons/standard/promotions_workspace.js +5 -0
- package/icons/standard/qualifications.js +5 -0
- package/icons/standard/report_type.js +5 -0
- package/icons/standard/serialized_product.js +1 -1
- package/icons/standard/serialized_product_transaction.js +1 -1
- package/icons/standard/story.js +1 -1
- package/icons/standard/tour.js +5 -0
- package/icons/standard/tour_check.js +5 -0
- package/icons/standard/travel_mode.js +1 -1
- package/icons/standard/unified_health_score.js +5 -0
- package/icons/standard/workforce_engagement.js +5 -0
- package/icons/utility/asset_audit.js +5 -0
- package/icons/utility/asset_warranty.js +1 -1
- package/icons/utility/block_visitor.js +1 -1
- package/icons/utility/bookmark_alt.js +5 -0
- package/icons/utility/change_request.js +5 -0
- package/icons/utility/collection_alt.js +5 -0
- package/icons/utility/contract_doc.js +5 -0
- package/icons/utility/contract_payment.js +5 -0
- package/icons/utility/coupon_codes.js +5 -0
- package/icons/utility/discounts.js +5 -0
- package/icons/utility/einstein.js +1 -1
- package/icons/utility/entitlement.js +5 -0
- package/icons/utility/field_sales.js +5 -0
- package/icons/utility/incident.js +5 -0
- package/icons/utility/index.js +37 -8
- package/icons/utility/layout_banner.js +5 -0
- package/icons/utility/layout_card.js +5 -0
- package/icons/utility/layout_overlap.js +5 -0
- package/icons/utility/layout_tile.js +5 -0
- package/icons/utility/light_bulb.js +1 -1
- package/icons/utility/problem.js +5 -0
- package/icons/utility/product_consumed_state.js +5 -0
- package/icons/utility/product_transfer.js +5 -0
- package/icons/utility/product_transfer_state.js +5 -0
- package/icons/utility/promotion_segments.js +5 -0
- package/icons/utility/promotions.js +1 -1
- package/icons/utility/promotions_workspace.js +5 -0
- package/icons/utility/qualifications.js +5 -0
- package/icons/utility/reminder.js +1 -1
- package/icons/utility/scan.js +5 -0
- package/icons/utility/search.js +1 -1
- package/icons/utility/shopping_bag.js +1 -1
- package/icons/utility/signature.js +5 -0
- package/icons/utility/spacer.js +5 -0
- package/icons/utility/tour.js +5 -0
- package/icons/utility/tour_check.js +5 -0
- package/icons/utility/truck.js +5 -0
- package/icons/utility/workforce_engagement.js +5 -0
- package/lib/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
- package/lib/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
- package/lib/components/combobox/combobox.d.ts +11 -11
- package/lib/components/combobox/combobox.js +27 -23
- package/lib/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
- package/lib/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
- package/lib/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
- package/lib/components/menu-dropdown/menu-dropdown.js +3 -5
- package/lib/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
- package/lib/components/setup-assistant.d.ts +1 -1
- package/lib/icons/standard/account_info.js +20 -0
- package/lib/icons/standard/asset_audit.js +18 -0
- package/lib/icons/standard/asset_warranty.js +2 -1
- package/lib/icons/standard/attach.js +18 -0
- package/lib/icons/standard/budget.js +18 -0
- package/lib/icons/standard/budget_allocation.js +31 -0
- package/lib/icons/standard/change_request.js +18 -0
- package/lib/icons/standard/code_set.js +20 -0
- package/lib/icons/standard/code_set_bundle.js +20 -0
- package/lib/icons/standard/contract_payment.js +28 -0
- package/lib/icons/standard/coupon_codes.js +18 -0
- package/lib/icons/standard/discounts.js +22 -0
- package/lib/icons/standard/field_sales.js +20 -0
- package/lib/icons/standard/filter_criteria_rule.js +18 -0
- package/lib/icons/standard/historical_adherence.js +22 -0
- package/lib/icons/standard/identifier.js +18 -0
- package/lib/icons/standard/incident.js +27 -0
- package/lib/icons/standard/index.js +366 -28
- package/lib/icons/standard/med_rec_recommendation.js +20 -0
- package/lib/icons/standard/med_rec_statement_recommendation.js +18 -0
- package/lib/icons/standard/medication.js +33 -0
- package/lib/icons/standard/medication_dispense.js +35 -0
- package/lib/icons/standard/medication_reconciliation.js +18 -0
- package/lib/icons/standard/medication_statement.js +18 -0
- package/lib/icons/standard/network_contract.js +22 -0
- package/lib/icons/standard/patient_medication_dosage.js +20 -0
- package/lib/icons/standard/person_language.js +20 -0
- package/lib/icons/standard/person_name.js +19 -0
- package/lib/icons/standard/problem.js +18 -0
- package/lib/icons/standard/product_consumed_state.js +19 -0
- package/lib/icons/standard/product_transfer.js +2 -1
- package/lib/icons/standard/product_transfer_state.js +19 -0
- package/lib/icons/standard/promotion_segments.js +22 -0
- package/lib/icons/standard/promotions_workspace.js +23 -0
- package/lib/icons/standard/qualifications.js +22 -0
- package/lib/icons/standard/report_type.js +24 -0
- package/lib/icons/standard/serialized_product.js +1 -1
- package/lib/icons/standard/serialized_product_transaction.js +5 -3
- package/lib/icons/standard/story.js +9 -14
- package/lib/icons/standard/tour.js +25 -0
- package/lib/icons/standard/tour_check.js +20 -0
- package/lib/icons/standard/travel_mode.js +2 -2
- package/lib/icons/standard/unified_health_score.js +18 -0
- package/lib/icons/standard/workforce_engagement.js +20 -0
- package/lib/icons/utility/asset_audit.js +31 -0
- package/lib/icons/utility/asset_warranty.js +2 -1
- package/lib/icons/utility/block_visitor.js +2 -4
- package/lib/icons/utility/bookmark_alt.js +18 -0
- package/lib/icons/utility/change_request.js +18 -0
- package/lib/icons/utility/collection_alt.js +26 -0
- package/lib/icons/utility/contract_doc.js +20 -0
- package/lib/icons/utility/contract_payment.js +28 -0
- package/lib/icons/utility/coupon_codes.js +18 -0
- package/lib/icons/utility/discounts.js +22 -0
- package/lib/icons/utility/einstein.js +7 -1
- package/lib/icons/utility/entitlement.js +18 -0
- package/lib/icons/utility/field_sales.js +20 -0
- package/lib/icons/utility/incident.js +27 -0
- package/lib/icons/utility/index.js +290 -19
- package/lib/icons/utility/layout_banner.js +19 -0
- package/lib/icons/utility/layout_card.js +19 -0
- package/lib/icons/utility/layout_overlap.js +19 -0
- package/lib/icons/utility/layout_tile.js +19 -0
- package/lib/icons/utility/light_bulb.js +1 -0
- package/lib/icons/utility/problem.js +18 -0
- package/lib/icons/utility/product_consumed_state.js +19 -0
- package/lib/icons/utility/product_transfer.js +19 -0
- package/lib/icons/utility/product_transfer_state.js +19 -0
- package/lib/icons/utility/promotion_segments.js +22 -0
- package/lib/icons/utility/promotions.js +2 -2
- package/lib/icons/utility/promotions_workspace.js +23 -0
- package/lib/icons/utility/qualifications.js +22 -0
- package/lib/icons/utility/reminder.js +3 -5
- package/lib/icons/utility/scan.js +18 -0
- package/lib/icons/utility/search.js +1 -1
- package/lib/icons/utility/shopping_bag.js +3 -5
- package/lib/icons/utility/signature.js +22 -0
- package/lib/icons/utility/spacer.js +19 -0
- package/lib/icons/utility/tour.js +25 -0
- package/lib/icons/utility/tour_check.js +20 -0
- package/lib/icons/utility/truck.js +29 -0
- package/lib/icons/utility/workforce_engagement.js +20 -0
- package/lib/package.json +1 -1
- package/module/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
- package/module/components/combobox/__tests__/combobox.browser-test.js +5 -6
- package/module/components/combobox/__tests__/combobox.browser-test.js.map +1 -1
- package/module/components/combobox/combobox.d.ts +11 -11
- package/module/components/combobox/combobox.js +27 -23
- package/module/components/combobox/combobox.js.map +1 -1
- package/module/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
- package/module/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
- package/module/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
- package/module/components/menu-dropdown/menu-dropdown.js +3 -5
- package/module/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/module/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
- package/module/components/setup-assistant.d.ts +1 -1
- package/module/icons/standard/account_info.js +12 -0
- package/module/icons/standard/asset_audit.js +10 -0
- package/module/icons/standard/asset_warranty.js +2 -1
- package/module/icons/standard/attach.js +10 -0
- package/module/icons/standard/budget.js +10 -0
- package/module/icons/standard/budget_allocation.js +23 -0
- package/module/icons/standard/change_request.js +10 -0
- package/module/icons/standard/code_set.js +12 -0
- package/module/icons/standard/code_set_bundle.js +12 -0
- package/module/icons/standard/contract_payment.js +20 -0
- package/module/icons/standard/coupon_codes.js +10 -0
- package/module/icons/standard/discounts.js +14 -0
- package/module/icons/standard/field_sales.js +12 -0
- package/module/icons/standard/filter_criteria_rule.js +10 -0
- package/module/icons/standard/historical_adherence.js +14 -0
- package/module/icons/standard/identifier.js +10 -0
- package/module/icons/standard/incident.js +19 -0
- package/module/icons/standard/index.js +366 -28
- package/module/icons/standard/med_rec_recommendation.js +12 -0
- package/module/icons/standard/med_rec_statement_recommendation.js +10 -0
- package/module/icons/standard/medication.js +25 -0
- package/module/icons/standard/medication_dispense.js +27 -0
- package/module/icons/standard/medication_reconciliation.js +10 -0
- package/module/icons/standard/medication_statement.js +10 -0
- package/module/icons/standard/network_contract.js +14 -0
- package/module/icons/standard/patient_medication_dosage.js +12 -0
- package/module/icons/standard/person_language.js +12 -0
- package/module/icons/standard/person_name.js +11 -0
- package/module/icons/standard/problem.js +10 -0
- package/module/icons/standard/product_consumed_state.js +11 -0
- package/module/icons/standard/product_transfer.js +2 -1
- package/module/icons/standard/product_transfer_state.js +11 -0
- package/module/icons/standard/promotion_segments.js +14 -0
- package/module/icons/standard/promotions_workspace.js +15 -0
- package/module/icons/standard/qualifications.js +14 -0
- package/module/icons/standard/report_type.js +16 -0
- package/module/icons/standard/serialized_product.js +1 -1
- package/module/icons/standard/serialized_product_transaction.js +5 -3
- package/module/icons/standard/story.js +9 -14
- package/module/icons/standard/tour.js +17 -0
- package/module/icons/standard/tour_check.js +12 -0
- package/module/icons/standard/travel_mode.js +2 -2
- package/module/icons/standard/unified_health_score.js +10 -0
- package/module/icons/standard/workforce_engagement.js +12 -0
- package/module/icons/utility/asset_audit.js +23 -0
- package/module/icons/utility/asset_warranty.js +2 -1
- package/module/icons/utility/block_visitor.js +2 -4
- package/module/icons/utility/bookmark_alt.js +10 -0
- package/module/icons/utility/change_request.js +10 -0
- package/module/icons/utility/collection_alt.js +18 -0
- package/module/icons/utility/contract_doc.js +12 -0
- package/module/icons/utility/contract_payment.js +20 -0
- package/module/icons/utility/coupon_codes.js +10 -0
- package/module/icons/utility/discounts.js +14 -0
- package/module/icons/utility/einstein.js +7 -1
- package/module/icons/utility/entitlement.js +10 -0
- package/module/icons/utility/field_sales.js +12 -0
- package/module/icons/utility/incident.js +19 -0
- package/module/icons/utility/index.js +290 -19
- package/module/icons/utility/layout_banner.js +11 -0
- package/module/icons/utility/layout_card.js +11 -0
- package/module/icons/utility/layout_overlap.js +11 -0
- package/module/icons/utility/layout_tile.js +11 -0
- package/module/icons/utility/light_bulb.js +1 -0
- package/module/icons/utility/problem.js +10 -0
- package/module/icons/utility/product_consumed_state.js +11 -0
- package/module/icons/utility/product_transfer.js +11 -0
- package/module/icons/utility/product_transfer_state.js +11 -0
- package/module/icons/utility/promotion_segments.js +14 -0
- package/module/icons/utility/promotions.js +2 -2
- package/module/icons/utility/promotions_workspace.js +15 -0
- package/module/icons/utility/qualifications.js +14 -0
- package/module/icons/utility/reminder.js +3 -5
- package/module/icons/utility/scan.js +10 -0
- package/module/icons/utility/search.js +1 -1
- package/module/icons/utility/shopping_bag.js +3 -5
- package/module/icons/utility/signature.js +14 -0
- package/module/icons/utility/spacer.js +11 -0
- package/module/icons/utility/tour.js +17 -0
- package/module/icons/utility/tour_check.js +12 -0
- package/module/icons/utility/truck.js +21 -0
- package/module/icons/utility/workforce_engagement.js +12 -0
- package/package.json +1 -1
- package/design-system-react-components.js +0 -63079
- package/design-system-react-components.js.map +0 -1
- package/design-system-react-components.min.js +0 -3
- package/design-system-react-components.min.js.LICENSE.txt +0 -83
- package/design-system-react-components.min.js.map +0 -1
- package/design-system-react.js +0 -73864
- package/design-system-react.js.map +0 -1
- package/design-system-react.min.js +0 -3
- package/design-system-react.min.js.LICENSE.txt +0 -83
- package/design-system-react.min.js.map +0 -1
- package/lib/design-system-react-components.min.js.LICENSE.txt +0 -83
- 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,
|
|
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.
|
|
234
|
+
expect(nodes.combobox).attr('aria-expanded', 'false');
|
|
236
235
|
// open
|
|
237
236
|
nodes.input.simulate('click', {});
|
|
238
|
-
expect(nodes.
|
|
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 () {
|
|
@@ -58,16 +58,16 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
|
|
|
58
58
|
* _Tested with Mocha testing._
|
|
59
59
|
*/
|
|
60
60
|
events?: Partial<{
|
|
61
|
-
onBlur?: (
|
|
62
|
-
onChange?: (v: any) => any;
|
|
63
|
-
onClose?: (v: any) => any;
|
|
64
|
-
onFocus?: (v: any) => any;
|
|
65
|
-
onOpen?: (v: any) => any;
|
|
66
|
-
onRequestClose?: (v: any) => any;
|
|
67
|
-
onRequestOpen?: (v: any) => any;
|
|
68
|
-
onRequestRemoveSelectedOption?: (v: any) => any;
|
|
69
|
-
onSelect?: (v: any) => any;
|
|
70
|
-
onSubmit?: (v: any) => any;
|
|
61
|
+
onBlur?: (event: React.SyntheticEvent) => any;
|
|
62
|
+
onChange?: (event: React.SyntheticEvent, v: any) => any;
|
|
63
|
+
onClose?: (event: React.SyntheticEvent, v: any) => any;
|
|
64
|
+
onFocus?: (event: React.SyntheticEvent, v: any) => any;
|
|
65
|
+
onOpen?: (event: React.SyntheticEvent, v: any) => any;
|
|
66
|
+
onRequestClose?: (event: React.SyntheticEvent, v: any) => any;
|
|
67
|
+
onRequestOpen?: (event: React.SyntheticEvent, v: any) => any;
|
|
68
|
+
onRequestRemoveSelectedOption?: (event: React.SyntheticEvent, v: any) => any;
|
|
69
|
+
onSelect?: (event: React.SyntheticEvent, v: any) => any;
|
|
70
|
+
onSubmit?: (event: React.SyntheticEvent, v: any) => any;
|
|
71
71
|
}>;
|
|
72
72
|
/**
|
|
73
73
|
* Message to display when the input is in an error state. When this is present, also visually highlights the component as in error. _Tested with snapshot testing._
|
|
@@ -183,7 +183,7 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
|
|
|
183
183
|
label?: string;
|
|
184
184
|
subTitle?: string;
|
|
185
185
|
type?: string;
|
|
186
|
-
disabled?:
|
|
186
|
+
disabled?: boolean;
|
|
187
187
|
tooltipContent?: React.ReactNode;
|
|
188
188
|
}>[];
|
|
189
189
|
/**
|
|
@@ -1075,15 +1075,18 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1075
1075
|
}, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1076
1076
|
,
|
|
1077
1077
|
role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1078
|
+
,
|
|
1079
|
+
"aria-expanded": _this.getIsOpen(),
|
|
1080
|
+
"aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1081
|
+
// used on menu's listbox
|
|
1082
|
+
,
|
|
1083
|
+
"aria-owns": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1078
1084
|
|
|
1079
1085
|
}, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
|
|
1080
1086
|
"aria-autocomplete": "list",
|
|
1081
1087
|
"aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
|
|
1082
1088
|
"aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
|
|
1083
1089
|
"aria-describedby": _this.getErrorId(),
|
|
1084
|
-
"aria-expanded": _this.getIsOpen(),
|
|
1085
|
-
"aria-haspopup": "listbox",
|
|
1086
|
-
role: "combobox",
|
|
1087
1090
|
autoComplete: "off",
|
|
1088
1091
|
className: "slds-combobox__input",
|
|
1089
1092
|
containerProps: {
|
|
@@ -1109,6 +1112,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1109
1112
|
defaultValue: props.defaultValue,
|
|
1110
1113
|
readOnly: !!(props.predefinedOptionsOnly && _this.state.activeOption),
|
|
1111
1114
|
required: props.required,
|
|
1115
|
+
role: "textbox",
|
|
1112
1116
|
value: props.predefinedOptionsOnly ? _this.state.activeOption && _this.state.activeOption.label || props.value : props.value
|
|
1113
1117
|
}, userDefinedProps.input)), _this.getDialog({
|
|
1114
1118
|
menuRenderer: _this.renderMenu({
|
|
@@ -1180,16 +1184,15 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1180
1184
|
}, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1181
1185
|
,
|
|
1182
1186
|
role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1187
|
+
,
|
|
1188
|
+
"aria-expanded": _this.getIsOpen(),
|
|
1189
|
+
"aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1183
1190
|
|
|
1184
1191
|
}, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
|
|
1185
1192
|
"aria-autocomplete": "list",
|
|
1186
1193
|
"aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
|
|
1187
1194
|
"aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
|
|
1188
1195
|
"aria-describedby": _this.getErrorId(),
|
|
1189
|
-
"aria-expanded": _this.getIsOpen(),
|
|
1190
|
-
"aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1191
|
-
,
|
|
1192
|
-
role: "combobox",
|
|
1193
1196
|
defaultValue: props.defaultValue,
|
|
1194
1197
|
autoComplete: "off",
|
|
1195
1198
|
className: "slds-combobox__input",
|
|
@@ -1215,6 +1218,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1215
1218
|
placeholder: labels.placeholder,
|
|
1216
1219
|
readOnly: !!(props.predefinedOptionsOnly && _this.state.activeOption),
|
|
1217
1220
|
required: props.required,
|
|
1221
|
+
role: "textbox",
|
|
1218
1222
|
value: props.predefinedOptionsOnly ? _this.state.activeOption && _this.state.activeOption.label || props.value : props.value
|
|
1219
1223
|
}, userDefinedProps.input)), _this.getDialog({
|
|
1220
1224
|
menuRenderer: _this.renderMenu({
|
|
@@ -1250,6 +1254,9 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1250
1254
|
}, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1251
1255
|
,
|
|
1252
1256
|
role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1257
|
+
,
|
|
1258
|
+
"aria-expanded": _this.getIsOpen(),
|
|
1259
|
+
"aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1253
1260
|
|
|
1254
1261
|
}, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
|
|
1255
1262
|
defaultValue: props.defaultValue,
|
|
@@ -1257,10 +1264,6 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1257
1264
|
"aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
|
|
1258
1265
|
"aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
|
|
1259
1266
|
"aria-describedby": _this.getErrorId(),
|
|
1260
|
-
"aria-expanded": _this.getIsOpen(),
|
|
1261
|
-
"aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1262
|
-
,
|
|
1263
|
-
role: "combobox",
|
|
1264
1267
|
autoComplete: "off",
|
|
1265
1268
|
className: "slds-combobox__input",
|
|
1266
1269
|
containerProps: {
|
|
@@ -1305,6 +1308,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1305
1308
|
placeholder: labels.placeholder,
|
|
1306
1309
|
readOnly: !!(props.predefinedOptionsOnly && _this.state.activeOption) || !!props.selection.length,
|
|
1307
1310
|
required: props.required,
|
|
1311
|
+
role: "textbox",
|
|
1308
1312
|
value: props.predefinedOptionsOnly ? _this.state.activeOption && _this.state.activeOption.label || props.value : value
|
|
1309
1313
|
}, userDefinedProps.input)), _this.getDialog({
|
|
1310
1314
|
menuRenderer: _this.renderMenu({
|
|
@@ -1382,15 +1386,14 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1382
1386
|
}, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1383
1387
|
,
|
|
1384
1388
|
role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1389
|
+
,
|
|
1390
|
+
"aria-expanded": _this.getIsOpen(),
|
|
1391
|
+
"aria-haspopup": "dialog" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1385
1392
|
|
|
1386
1393
|
}, /*#__PURE__*/_react.default.createElement(_popover.default, popoverProps, /*#__PURE__*/_react.default.createElement(_innerInput.default, {
|
|
1387
1394
|
"aria-autocomplete": "none",
|
|
1388
1395
|
"aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-popover") : undefined,
|
|
1389
1396
|
"aria-describedby": _this.getErrorId(),
|
|
1390
|
-
"aria-expanded": _this.getIsOpen(),
|
|
1391
|
-
"aria-haspopup": "dialog" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1392
|
-
,
|
|
1393
|
-
role: "combobox",
|
|
1394
1397
|
autoComplete: "off",
|
|
1395
1398
|
className: "slds-combobox__input",
|
|
1396
1399
|
containerProps: {
|
|
@@ -1414,6 +1417,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1414
1417
|
placeholder: labels.placeholder,
|
|
1415
1418
|
readOnly: true,
|
|
1416
1419
|
required: props.required,
|
|
1420
|
+
role: "textbox",
|
|
1417
1421
|
value: props.value
|
|
1418
1422
|
})))), props.errorText && /*#__PURE__*/_react.default.createElement("div", {
|
|
1419
1423
|
className: "slds-has-error"
|
|
@@ -1441,6 +1445,9 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1441
1445
|
}, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1442
1446
|
,
|
|
1443
1447
|
role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1448
|
+
,
|
|
1449
|
+
"aria-expanded": _this.getIsOpen(),
|
|
1450
|
+
"aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1444
1451
|
|
|
1445
1452
|
}, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
|
|
1446
1453
|
defaultValue: props.defaultValue,
|
|
@@ -1448,10 +1455,6 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1448
1455
|
"aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
|
|
1449
1456
|
"aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
|
|
1450
1457
|
"aria-describedby": _this.getErrorId(),
|
|
1451
|
-
"aria-expanded": _this.getIsOpen(),
|
|
1452
|
-
"aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1453
|
-
,
|
|
1454
|
-
role: "combobox",
|
|
1455
1458
|
autoComplete: "off",
|
|
1456
1459
|
className: "slds-combobox__input",
|
|
1457
1460
|
containerProps: {
|
|
@@ -1479,6 +1482,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1479
1482
|
placeholder: labels.placeholderReadOnly,
|
|
1480
1483
|
readOnly: true,
|
|
1481
1484
|
required: props.required,
|
|
1485
|
+
role: "textbox",
|
|
1482
1486
|
value: value
|
|
1483
1487
|
}, userDefinedProps.input)), _this.getDialog({
|
|
1484
1488
|
menuRenderer: _this.renderMenu({
|
|
@@ -1538,6 +1542,9 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1538
1542
|
}, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1539
1543
|
,
|
|
1540
1544
|
role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1545
|
+
,
|
|
1546
|
+
"aria-expanded": _this.getIsOpen(),
|
|
1547
|
+
"aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1541
1548
|
|
|
1542
1549
|
}, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
|
|
1543
1550
|
defaultValue: props.defaultValue,
|
|
@@ -1545,10 +1552,6 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1545
1552
|
"aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
|
|
1546
1553
|
"aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
|
|
1547
1554
|
"aria-describedby": _this.getErrorId(),
|
|
1548
|
-
"aria-expanded": _this.getIsOpen(),
|
|
1549
|
-
"aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1550
|
-
,
|
|
1551
|
-
role: "combobox",
|
|
1552
1555
|
autoComplete: "off",
|
|
1553
1556
|
className: "slds-combobox__input",
|
|
1554
1557
|
containerProps: {
|
|
@@ -1577,6 +1580,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
|
|
|
1577
1580
|
placeholder: labels.placeholderReadOnly,
|
|
1578
1581
|
readOnly: true,
|
|
1579
1582
|
required: props.required,
|
|
1583
|
+
role: "textbox",
|
|
1580
1584
|
value: inputValue
|
|
1581
1585
|
}, userDefinedProps.input)), _this.getDialog({
|
|
1582
1586
|
menuRenderer: _this.renderMenu({
|
package/lib/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap
CHANGED
|
@@ -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="
|
|
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="
|
|
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="
|
|
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="
|
|
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=\\"
|
|
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="
|
|
3750
|
+
role="textbox"
|
|
3751
3751
|
type="text"
|
|
3752
3752
|
value="2014"
|
|
3753
3753
|
/>
|