@thecb/components 8.4.11-beta.1 → 8.4.11-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "8.4.11-beta.1",
3
+ "version": "8.4.11-beta.3",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -92,6 +92,7 @@ const Alert = ({
92
92
  borderSize={noBorder ? "0px" : "1px"}
93
93
  boxShadow={enableBoxShadow ? generateShadows()?.inset?.base : ""}
94
94
  extraStyles={extraStyles}
95
+ role="alert"
95
96
  >
96
97
  {maxContentWidth ? (
97
98
  <Center maxWidth={maxContentWidth}>{content}</Center>
@@ -126,7 +126,7 @@ const Checkbox = ({
126
126
  onChange={onChange}
127
127
  tabIndex="-1"
128
128
  aria-invalid={error}
129
- aria-describedby={error ? `${name}-error-message` : ""}
129
+ aria-describedBy={error ? `${name}-error-message` : ""}
130
130
  />
131
131
  <StyledCheckbox
132
132
  error={error}
@@ -51,7 +51,6 @@ const AddressForm = ({
51
51
  <CountryDropdown
52
52
  labelTextWhenNoError="Country"
53
53
  errorMessages={countryErrorMessages}
54
- aria-label="country"
55
54
  field={fields.country}
56
55
  onChange={value => {
57
56
  actions.fields.country.set(value);
@@ -65,17 +64,19 @@ const AddressForm = ({
65
64
  }
66
65
  }}
67
66
  showErrors={showErrors}
67
+ aria-label="country"
68
+ aria-role="listbox"
68
69
  />
69
70
  <FormInput
70
71
  labelTextWhenNoError="Address"
71
72
  errorMessages={street1ErrorMessages}
72
73
  required={true}
73
- aria-label="address line 1"
74
74
  field={fields.street1}
75
75
  fieldActions={actions.fields.street1}
76
76
  showErrors={showErrors}
77
77
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
78
- autoComplete="address-line1"
78
+ autocomplete="address-line1"
79
+ aria-label="address line 1"
79
80
  />
80
81
  <FormInput
81
82
  labelTextWhenNoError="Apt, Suite, Unit, Floor, etc. (Optional)"
@@ -83,18 +84,19 @@ const AddressForm = ({
83
84
  fieldActions={actions.fields.street2}
84
85
  showErrors={showErrors}
85
86
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
86
- autoComplete="address-line2"
87
+ autocomplete="address-line2"
88
+ aria-label="address line 2"
87
89
  />
88
90
  <FormInput
89
91
  labelTextWhenNoError="City"
90
- aria-label="city"
91
92
  required={true}
92
93
  errorMessages={cityErrorMessages}
93
94
  field={fields.city}
94
95
  fieldActions={actions.fields.city}
95
96
  showErrors={showErrors}
96
97
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
97
- autoComplete="address-level2"
98
+ autocomplete="city"
99
+ aria-label="city"
98
100
  />
99
101
  <StateProvinceDropdown
100
102
  labelTextWhenNoError={isUS ? "State" : "State or Province"}
@@ -104,8 +106,8 @@ const AddressForm = ({
104
106
  fieldActions={actions.fields.stateProvince}
105
107
  showErrors={showErrors}
106
108
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
107
- autoComplete="address-level1"
108
- aria-label={isUS ? "State" : "State or Province"}
109
+ autoComplete="administrative-area"
110
+ aria-label={isUS ? "state" : "state or province"}
109
111
  required={true}
110
112
  />
111
113
  <FormInput
@@ -117,12 +119,13 @@ const AddressForm = ({
117
119
  fieldActions={actions.fields.zip}
118
120
  showErrors={showErrors}
119
121
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
120
- autoComplete="postal-code"
122
+ aria-label="zip code"
123
+ autocomplete="postal-code"
121
124
  />
122
125
  {showWalletCheckbox && (
123
126
  <Checkbox
124
127
  name="address checkbox"
125
- title="Save address to wallet"
128
+ title="Save address to Wallet"
126
129
  checked={walletCheckboxMarked}
127
130
  onChange={saveToWallet}
128
131
  />