nsw-design-system 3.11.1 → 3.11.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.
package/dist/js/main.js
CHANGED
|
@@ -1364,9 +1364,10 @@
|
|
|
1364
1364
|
} else if (count > 1) {
|
|
1365
1365
|
label = `${count} ${this.textSelected}`;
|
|
1366
1366
|
ariaLabel = `${count} ${this.textSelected}, Please select`;
|
|
1367
|
-
} else if (count
|
|
1368
|
-
|
|
1369
|
-
label =
|
|
1367
|
+
} else if (count === 1) {
|
|
1368
|
+
const selectedOption = this.getSelectedOption();
|
|
1369
|
+
label = selectedOption.closest('.nsw-multi-select__option').getAttribute('data-label');
|
|
1370
|
+
ariaLabel = `${label}, Please select`;
|
|
1370
1371
|
} else {
|
|
1371
1372
|
label = noSelectionText;
|
|
1372
1373
|
ariaLabel = 'Please select';
|
package/package.json
CHANGED
|
@@ -252,9 +252,10 @@ class Select {
|
|
|
252
252
|
} else if (count > 1) {
|
|
253
253
|
label = `${count} ${this.textSelected}`
|
|
254
254
|
ariaLabel = `${count} ${this.textSelected}, Please select`
|
|
255
|
-
} else if (count
|
|
256
|
-
|
|
257
|
-
label =
|
|
255
|
+
} else if (count === 1) {
|
|
256
|
+
const selectedOption = this.getSelectedOption()
|
|
257
|
+
label = selectedOption.closest('.nsw-multi-select__option').getAttribute('data-label')
|
|
258
|
+
ariaLabel = `${label}, Please select`
|
|
258
259
|
} else {
|
|
259
260
|
label = noSelectionText
|
|
260
261
|
ariaLabel = 'Please select'
|