nsw-design-system 3.11.0 → 3.11.1
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
|
@@ -1333,7 +1333,7 @@
|
|
|
1333
1333
|
this.updateTriggerAria(ariaLabel);
|
|
1334
1334
|
}
|
|
1335
1335
|
initButtonSelect() {
|
|
1336
|
-
const triggerLabel = this.getSelectedOptionText(
|
|
1336
|
+
const triggerLabel = this.getSelectedOptionText();
|
|
1337
1337
|
const button = `<button class="nsw-button nsw-multi-select__button" aria-label="${triggerLabel[1]}" aria-expanded="false" aria-controls="${this.selectId}-dropdown">
|
|
1338
1338
|
<span aria-hidden="true" class="nsw-multi-select__label">${triggerLabel[0]}</span>
|
|
1339
1339
|
<span class="material-icons nsw-material-icons" focusable="false" aria-hidden="true">keyboard_arrow_down</span>
|
|
@@ -1358,7 +1358,7 @@
|
|
|
1358
1358
|
let label = '';
|
|
1359
1359
|
let ariaLabel = '';
|
|
1360
1360
|
const count = this.getSelectedOptionCount();
|
|
1361
|
-
if (count === this.options.length) {
|
|
1361
|
+
if (count === this.options.length && this.dropdown) {
|
|
1362
1362
|
label = `All ${this.textSelected}`;
|
|
1363
1363
|
ariaLabel = `All ${this.textSelected}`;
|
|
1364
1364
|
} else if (count > 1) {
|
|
@@ -1366,7 +1366,7 @@
|
|
|
1366
1366
|
ariaLabel = `${count} ${this.textSelected}, Please select`;
|
|
1367
1367
|
} else if (count > 0) {
|
|
1368
1368
|
ariaLabel += `${this.options[0].text}, Please select`;
|
|
1369
|
-
label = this.
|
|
1369
|
+
label = this.getSelectedOption().closest('.nsw-multi-select__option').dataset.label;
|
|
1370
1370
|
} else {
|
|
1371
1371
|
label = noSelectionText;
|
|
1372
1372
|
ariaLabel = 'Please select';
|
package/package.json
CHANGED
|
@@ -215,7 +215,7 @@ class Select {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
initButtonSelect() {
|
|
218
|
-
const triggerLabel = this.getSelectedOptionText(
|
|
218
|
+
const triggerLabel = this.getSelectedOptionText()
|
|
219
219
|
|
|
220
220
|
const button = `<button class="nsw-button nsw-multi-select__button" aria-label="${triggerLabel[1]}" aria-expanded="false" aria-controls="${this.selectId}-dropdown">
|
|
221
221
|
<span aria-hidden="true" class="nsw-multi-select__label">${triggerLabel[0]}</span>
|
|
@@ -246,7 +246,7 @@ class Select {
|
|
|
246
246
|
let ariaLabel = ''
|
|
247
247
|
const count = this.getSelectedOptionCount()
|
|
248
248
|
|
|
249
|
-
if (count === this.options.length) {
|
|
249
|
+
if (count === this.options.length && this.dropdown) {
|
|
250
250
|
label = `All ${this.textSelected}`
|
|
251
251
|
ariaLabel = `All ${this.textSelected}`
|
|
252
252
|
} else if (count > 1) {
|
|
@@ -254,7 +254,7 @@ class Select {
|
|
|
254
254
|
ariaLabel = `${count} ${this.textSelected}, Please select`
|
|
255
255
|
} else if (count > 0) {
|
|
256
256
|
ariaLabel += `${this.options[0].text}, Please select`
|
|
257
|
-
label = this.
|
|
257
|
+
label = this.getSelectedOption().closest('.nsw-multi-select__option').dataset.label
|
|
258
258
|
} else {
|
|
259
259
|
label = noSelectionText
|
|
260
260
|
ariaLabel = 'Please select'
|