@sapudex/web-components 2.61.0 → 2.62.0
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/cypress/specs/AccordionSpotlight.cy.tsx +43 -2
- package/cypress/specs/Carousel.cy.tsx +88 -0
- package/cypress/specs/CountrySelector.cy.tsx +233 -6
- package/cypress/specs/FilterMenu.cy.tsx +39 -45
- package/cypress/specs/List.cy.tsx +624 -10
- package/cypress/specs/ListItem.cy.tsx +50 -0
- package/cypress/specs/SelectBox.cy.tsx +239 -131
- package/cypress/specs/SelectBoxAccessibility.cy.tsx +3109 -0
- package/cypress/specs/TagGroup.cy.tsx +168 -0
- package/dist/AccordionSpotlight.d.ts +7 -2
- package/dist/AccordionSpotlight.js +31 -6
- package/dist/AccordionSpotlight.js.map +1 -1
- package/dist/AccordionSpotlightItem.d.ts +3 -1
- package/dist/AccordionSpotlightItem.js +3 -1
- package/dist/AccordionSpotlightItem.js.map +1 -1
- package/dist/Carousel.d.ts +1 -0
- package/dist/Carousel.js +19 -3
- package/dist/Carousel.js.map +1 -1
- package/dist/CountrySelector.js +1 -3
- package/dist/CountrySelector.js.map +1 -1
- package/dist/List.d.ts +2 -0
- package/dist/List.js +22 -4
- package/dist/List.js.map +1 -1
- package/dist/ListGroupHeader.js +5 -1
- package/dist/ListGroupHeader.js.map +1 -1
- package/dist/ListGroupHeaderBase.d.ts +2 -0
- package/dist/ListGroupHeaderBase.js +15 -2
- package/dist/ListGroupHeaderBase.js.map +1 -1
- package/dist/ListGroupHeaderTemplate.js +14 -22
- package/dist/ListGroupHeaderTemplate.js.map +1 -1
- package/dist/ListItem.d.ts +1 -2
- package/dist/ListItem.js +14 -12
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.d.ts +5 -0
- package/dist/ListItemBase.js +11 -1
- package/dist/ListItemBase.js.map +1 -1
- package/dist/ListItemTemplate.js +1 -1
- package/dist/ListItemTemplate.js.map +1 -1
- package/dist/ListSelectAllTemplate.js +1 -1
- package/dist/ListSelectAllTemplate.js.map +1 -1
- package/dist/ListTemplate.js +2 -1
- package/dist/ListTemplate.js.map +1 -1
- package/dist/Search.d.ts +13 -3
- package/dist/Search.js +36 -11
- package/dist/Search.js.map +1 -1
- package/dist/SearchableListBase.d.ts +2 -0
- package/dist/SearchableListBase.js +13 -3
- package/dist/SearchableListBase.js.map +1 -1
- package/dist/SearchableListBaseTemplate.js +42 -33
- package/dist/SearchableListBaseTemplate.js.map +1 -1
- package/dist/SelectBase.d.ts +18 -33
- package/dist/SelectBase.js +124 -139
- package/dist/SelectBase.js.map +1 -1
- package/dist/SelectBox.d.ts +3 -0
- package/dist/SelectBox.js +19 -7
- package/dist/SelectBox.js.map +1 -1
- package/dist/SelectBoxTemplate.js +3 -3
- package/dist/SelectBoxTemplate.js.map +1 -1
- package/dist/SideNavigationItem.js +2 -0
- package/dist/SideNavigationItem.js.map +1 -1
- package/dist/SideNavigationItemTemplate.d.ts +2 -0
- package/dist/SideNavigationItemTemplate.js +15 -0
- package/dist/SideNavigationItemTemplate.js.map +1 -0
- package/dist/SideNavigationMobile.js +1 -2
- package/dist/SideNavigationMobile.js.map +1 -1
- package/dist/SideNavigationSubItem.js +2 -1
- package/dist/SideNavigationSubItem.js.map +1 -1
- package/dist/SideNavigationSubItemTemplate.js +1 -2
- package/dist/SideNavigationSubItemTemplate.js.map +1 -1
- package/dist/TagGroup.d.ts +3 -0
- package/dist/TagGroup.js +31 -0
- package/dist/TagGroup.js.map +1 -1
- package/dist/TagGroupTemplate.js +1 -1
- package/dist/TagGroupTemplate.js.map +1 -1
- package/dist/assets/{InputSuggestions-1OnUn6pM.js → InputSuggestions-BPKrPqPb.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-CoBAMp_v.js → ListItemStandardExpandableTextTemplate-DkdOcCxC.js} +1 -1
- package/dist/assets/{bundle.esm-BqaVWFKf.js → bundle.esm-17Yt5gDr.js} +232 -233
- package/dist/css/themes/AccordionSpotlight.css +1 -1
- package/dist/css/themes/ListGroupHeader.css +1 -1
- package/dist/css/themes/SideNavigationItem.css +1 -1
- package/dist/css/themes/SideNavigationMobile.css +1 -1
- package/dist/css/themes/SideNavigationSubItem.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/custom-elements-internal.json +7 -7
- package/dist/custom-elements.json +7 -7
- package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
- package/dist/generated/i18n/i18n-defaults.js +2 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/AccordionSpotlight.css.d.ts +1 -1
- package/dist/generated/themes/AccordionSpotlight.css.js +1 -1
- package/dist/generated/themes/AccordionSpotlight.css.js.map +1 -1
- package/dist/generated/themes/ListGroupHeader.css.d.ts +1 -1
- package/dist/generated/themes/ListGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/SideNavigationItem.css.d.ts +1 -1
- package/dist/generated/themes/SideNavigationItem.css.js +1 -1
- package/dist/generated/themes/SideNavigationItem.css.js.map +1 -1
- package/dist/generated/themes/SideNavigationMobile.css.d.ts +1 -1
- package/dist/generated/themes/SideNavigationMobile.css.js +1 -1
- package/dist/generated/themes/SideNavigationMobile.css.js.map +1 -1
- package/dist/generated/themes/SideNavigationSubItem.css.d.ts +1 -1
- package/dist/generated/themes/SideNavigationSubItem.css.js +1 -1
- package/dist/generated/themes/SideNavigationSubItem.css.js.map +1 -1
- package/dist/generated/themes/Table.css.d.ts +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/messagebundle.properties +3 -0
- package/dist/vscode.html-custom-data.json +4 -4
- package/dist/web-types.json +9 -9
- package/package.json +1 -1
- package/src/AccordionSpotlight.ts +35 -6
- package/src/AccordionSpotlightItem.ts +3 -1
- package/src/Carousel.ts +22 -3
- package/src/CountrySelector.ts +1 -3
- package/src/List.ts +21 -4
- package/src/ListGroupHeader.ts +5 -1
- package/src/ListGroupHeaderBase.ts +16 -2
- package/src/ListGroupHeaderTemplate.tsx +29 -47
- package/src/ListItem.ts +14 -13
- package/src/ListItemBase.ts +14 -1
- package/src/ListItemTemplate.tsx +4 -4
- package/src/ListSelectAllTemplate.tsx +10 -8
- package/src/ListTemplate.tsx +14 -10
- package/src/Search.ts +48 -13
- package/src/SearchableListBase.ts +15 -3
- package/src/SearchableListBaseTemplate.tsx +51 -36
- package/src/SelectBase.ts +130 -144
- package/src/SelectBox.ts +21 -7
- package/src/SelectBoxTemplate.tsx +10 -9
- package/src/SideNavigationItem.ts +2 -0
- package/src/SideNavigationItemTemplate.tsx +97 -0
- package/src/SideNavigationMobile.ts +1 -2
- package/src/SideNavigationSubItem.ts +2 -1
- package/src/SideNavigationSubItemTemplate.tsx +7 -6
- package/src/TagGroup.ts +32 -0
- package/src/TagGroupTemplate.tsx +1 -1
- package/src/generated/i18n/i18n-defaults.ts +2 -2
- package/src/generated/themes/AccordionSpotlight.css.ts +1 -1
- package/src/generated/themes/ListGroupHeader.css.ts +1 -1
- package/src/generated/themes/SideNavigationItem.css.ts +1 -1
- package/src/generated/themes/SideNavigationMobile.css.ts +1 -1
- package/src/generated/themes/SideNavigationSubItem.css.ts +1 -1
- package/src/generated/themes/Table.css.ts +1 -1
- package/src/i18n/messagebundle.properties +3 -0
- package/src/themes/AccordionSpotlight.css +9 -9
- package/src/themes/ListGroupHeader.css +2 -43
- package/src/themes/SideNavigationItem.css +56 -6
- package/src/themes/SideNavigationMobile.css +61 -15
- package/src/themes/SideNavigationSubItem.css +14 -109
- package/src/themes/Table.css +6 -1
- package/dist/css/themes/SideNavigationMobileDropdown.css +0 -1
- package/dist/generated/themes/SideNavigationMobileDropdown.css.d.ts +0 -2
- package/dist/generated/themes/SideNavigationMobileDropdown.css.js +0 -8
- package/dist/generated/themes/SideNavigationMobileDropdown.css.js.map +0 -1
- package/src/generated/themes/SideNavigationMobileDropdown.css.ts +0 -9
- package/src/themes/SideNavigationMobileDropdown.css +0 -36
|
@@ -222,6 +222,56 @@ describe("ListItem", () => {
|
|
|
222
222
|
});
|
|
223
223
|
});
|
|
224
224
|
|
|
225
|
+
describe("Standalone rated MultiSelect preservation", () => {
|
|
226
|
+
it("keeps real focus and selection on the inner option while retaining the standalone checkbox and rating names", () => {
|
|
227
|
+
cy.mount(
|
|
228
|
+
<div>
|
|
229
|
+
<button id="before-rated-list-item">Previous</button>
|
|
230
|
+
<UDExListItem id="standalone-rated-item" mode={UDExListMode.MultiSelect}
|
|
231
|
+
label="Rated choice" rating="4" ratingCount="4.0" totalCount="20"></UDExListItem>
|
|
232
|
+
</div>
|
|
233
|
+
);
|
|
234
|
+
const UDExItem = () => cy.get("#standalone-rated-item");
|
|
235
|
+
const UDExRow = () => UDExItem().shadow().find('[part="item"]');
|
|
236
|
+
const UDExAssertStandaloneState = (UDExSelected: boolean) => {
|
|
237
|
+
UDExRow().should("be.focused").should($row => {
|
|
238
|
+
expect($row).to.have.attr("role", "option");
|
|
239
|
+
expect($row).to.have.attr("tabindex", "0");
|
|
240
|
+
expect($row).to.have.attr("aria-selected", String(UDExSelected));
|
|
241
|
+
expect($row).not.to.have.attr("aria-checked");
|
|
242
|
+
});
|
|
243
|
+
UDExItem().should($host => {
|
|
244
|
+
expect($host[0]).to.have.property("_useHostAriaRole", false);
|
|
245
|
+
expect($host).not.to.have.attr("aria-selected");
|
|
246
|
+
expect($host[0]).to.have.property("selected", UDExSelected);
|
|
247
|
+
});
|
|
248
|
+
UDExItem().shadow().find("[udex-checkbox]").should($checkbox => {
|
|
249
|
+
expect($checkbox).to.have.attr("aria-hidden", "true");
|
|
250
|
+
expect($checkbox).to.have.attr("tabindex", "-1");
|
|
251
|
+
expect($checkbox[0]).to.have.property("checked", UDExSelected);
|
|
252
|
+
// Standalone real-focus items retain the existing name, including its trailing space.
|
|
253
|
+
const UDExName = `checkbox ${UDExSelected ? "Selected" : "Unselected"} `;
|
|
254
|
+
expect($checkbox[0]).to.have.property("accessibleName", UDExName);
|
|
255
|
+
expect($checkbox).to.have.attr("accessible-name", UDExName);
|
|
256
|
+
});
|
|
257
|
+
UDExItem().shadow().find(".udex-list__content-wrap").should("have.attr", "aria-label", "Rated choice");
|
|
258
|
+
UDExItem().shadow().find("[udex-rating-indicator]").should($rating => {
|
|
259
|
+
expect($rating).to.have.attr("aria-label", "Rating 4.0, Total 20, Rating Indicator 4 of 5");
|
|
260
|
+
expect($rating).to.have.attr("disabled");
|
|
261
|
+
expect($rating).to.have.attr("readonly");
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
cy.get("#before-rated-list-item").realClick();
|
|
266
|
+
cy.realPress("Tab");
|
|
267
|
+
UDExAssertStandaloneState(false);
|
|
268
|
+
cy.realPress("Enter");
|
|
269
|
+
UDExAssertStandaloneState(true);
|
|
270
|
+
cy.realPress("Space");
|
|
271
|
+
UDExAssertStandaloneState(false);
|
|
272
|
+
});
|
|
273
|
+
});
|
|
274
|
+
|
|
225
275
|
// Added: unit-level coverage for the WCAG 4.1.2 Treeview Checkbox pattern getter
|
|
226
276
|
// (ariaCheckedValue). It only activates when the item's accessible-role ===
|
|
227
277
|
// "treeitem" (set by SearchableListBase in the tree pattern). The inner checkbox
|
|
@@ -2,6 +2,29 @@ import { UDExSelectBox, UDExSelectBoxSelectAll, UDExSelectBoxGroupHeader, UDExSe
|
|
|
2
2
|
import { UDExListItemSize, UDExListMode, UDExListStyleType } from "../../src/types/List.js";
|
|
3
3
|
import { UDExAvatarShape, UDExAvatarSize } from "../../src/Avatar.js";
|
|
4
4
|
import UDExStatusBadgeValueState from "../../src/types/StatusBadgeValueState.js";
|
|
5
|
+
import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
|
6
|
+
|
|
7
|
+
function UDExAssertActiveItem(UDExIndex: number) {
|
|
8
|
+
cy.get("#select-box").shadow().find("[udex-list-item]").eq(UDExIndex).should($item => {
|
|
9
|
+
expect($item).to.have.attr("_active-descendant");
|
|
10
|
+
expect($item).to.have.class("_udex-active-descendant");
|
|
11
|
+
}).then($item => {
|
|
12
|
+
cy.get("#select-box").shadow().find("[_active-descendant]").should("have.length", 1).and($active => {
|
|
13
|
+
expect($active[0]).to.equal($item[0]);
|
|
14
|
+
});
|
|
15
|
+
cy.get("#select-box").shadow().find("._udex-active-descendant").should("have.length", 1).and($highlight => {
|
|
16
|
+
expect($highlight[0]).to.equal($item[0]);
|
|
17
|
+
});
|
|
18
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]')
|
|
19
|
+
.should("have.attr", "aria-activedescendant", $item[0].id);
|
|
20
|
+
});
|
|
21
|
+
cy.get("#select-box").shadow().find("[udex-list-item]").eq(UDExIndex).should("not.be.focused");
|
|
22
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]').should("be.focused").should($input => {
|
|
23
|
+
const UDExRoot = $input[0].getRootNode() as ShadowRoot;
|
|
24
|
+
expect($input[0].ownerDocument.activeElement).to.equal(UDExRoot.host);
|
|
25
|
+
expect(UDExRoot.activeElement).to.equal($input[0]);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
5
28
|
|
|
6
29
|
const selectBoxWithRating = <div style="width: 350px; position:relative;"><UDExSelectBox
|
|
7
30
|
id="select-box"
|
|
@@ -373,25 +396,38 @@ describe("SelectBox", () => {
|
|
|
373
396
|
.should("have.attr", "open");
|
|
374
397
|
});
|
|
375
398
|
|
|
399
|
+
// Updated: closed ArrowDown announces expanded and highlights the first item; the next press advances silently.
|
|
376
400
|
it("dropdown opens on pressing the `ArrowDown` key on the search", () => {
|
|
377
401
|
cy.mount(fullComponent);
|
|
378
402
|
cy.get("#select-box").shadow()
|
|
379
403
|
.find(".udex-text-field__search")
|
|
380
|
-
.
|
|
404
|
+
.focus()
|
|
381
405
|
.realPress("ArrowDown");
|
|
382
406
|
|
|
383
407
|
cy.get("#select-box").shadow()
|
|
384
408
|
.find(".udex-select-box__dropdown")
|
|
385
409
|
.should("have.attr","open");
|
|
410
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]')
|
|
411
|
+
.should("be.focused").and("have.attr", "aria-expanded", "true");
|
|
412
|
+
UDExAssertActiveItem(0);
|
|
413
|
+
cy.get("#select-box").shadow().find('[aria-live="polite"]').should("have.length", 1).and("have.text", "expanded");
|
|
414
|
+
|
|
415
|
+
cy.realPress("ArrowDown");
|
|
416
|
+
UDExAssertActiveItem(1);
|
|
417
|
+
cy.get("#select-box").shadow().find('[aria-live="polite"]').should("have.text", "");
|
|
386
418
|
});
|
|
387
419
|
|
|
420
|
+
// Updated: Escape clears the immediately active item and status; reopening re-announces expanded before navigation.
|
|
388
421
|
it("dropdown closes on pressing the `Escape`", () => {
|
|
389
422
|
cy.mount(fullComponent);
|
|
390
423
|
cy.get("#select-box").shadow()
|
|
391
424
|
.find(".udex-text-field__search")
|
|
392
|
-
.
|
|
425
|
+
.focus()
|
|
393
426
|
.realPress("ArrowDown");
|
|
394
427
|
|
|
428
|
+
cy.get("#select-box").shadow().find(".udex-select-box__dropdown").should("have.attr", "open");
|
|
429
|
+
UDExAssertActiveItem(0);
|
|
430
|
+
|
|
395
431
|
cy.get("#select-box").shadow()
|
|
396
432
|
.find(".udex-text-field__search")
|
|
397
433
|
.realPress("Escape");
|
|
@@ -399,6 +435,19 @@ describe("SelectBox", () => {
|
|
|
399
435
|
cy.get("#select-box").shadow()
|
|
400
436
|
.find(".udex-select-box__dropdown")
|
|
401
437
|
.should("not.have.attr","open");
|
|
438
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]')
|
|
439
|
+
.should("be.focused").and("have.attr", "aria-expanded", "false");
|
|
440
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]').should("not.have.attr", "aria-activedescendant");
|
|
441
|
+
cy.get("#select-box").shadow().find("[_active-descendant], ._udex-active-descendant").should("not.exist");
|
|
442
|
+
cy.get("#select-box").shadow().find('[aria-live="polite"]').should("have.text", "");
|
|
443
|
+
|
|
444
|
+
cy.realPress("ArrowDown");
|
|
445
|
+
cy.get("#select-box").shadow().find(".udex-select-box__dropdown").should("have.attr", "open");
|
|
446
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]').should("have.attr", "aria-expanded", "true");
|
|
447
|
+
UDExAssertActiveItem(0);
|
|
448
|
+
cy.get("#select-box").shadow().find('[aria-live="polite"]').should("have.length", 1).and("have.text", "expanded");
|
|
449
|
+
cy.realPress("ArrowDown");
|
|
450
|
+
UDExAssertActiveItem(1);
|
|
402
451
|
});
|
|
403
452
|
|
|
404
453
|
it("sets option label when Arrow Down key press on the list items", () => {
|
|
@@ -547,14 +596,31 @@ describe("SelectBox", () => {
|
|
|
547
596
|
.should("have.attr", "_active-descendant");
|
|
548
597
|
});
|
|
549
598
|
|
|
550
|
-
|
|
599
|
+
// Updated: plain preselected options remain a listbox; opening announces expanded before silent ArrowDown navigation.
|
|
600
|
+
it("SingleSelect mode - ArrowDown opens with the selected item active and the next ArrowDown activates the next item", () => {
|
|
551
601
|
cy.mount(singleSelectPreselected);
|
|
552
602
|
cy.get("#select-box").shadow().find(".udex-text-field__search").focus();
|
|
553
603
|
cy.realPress("ArrowDown");
|
|
554
604
|
|
|
605
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]').should("have.attr", "aria-haspopup", "listbox");
|
|
606
|
+
cy.get("#select-box").shadow().find("[udex-list]").should("have.attr", "role", "listbox");
|
|
555
607
|
cy.get("#select-box").shadow().find(".udex-select-box__dropdown").should("have.attr", "open");
|
|
608
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]')
|
|
609
|
+
.should("be.focused").and("have.attr", "aria-expanded", "true");
|
|
610
|
+
UDExAssertActiveItem(2);
|
|
611
|
+
cy.get("#select-box").shadow().find('[aria-live="polite"]').should("have.length", 1).and("have.text", "expanded");
|
|
556
612
|
cy.get("#select-box").shadow().find("[udex-list-item]").eq(2)
|
|
557
613
|
.should("have.attr", "_active-descendant");
|
|
614
|
+
cy.get("#select-box").shadow().find("[udex-list-item]").eq(0)
|
|
615
|
+
.should("not.have.attr", "_active-descendant");
|
|
616
|
+
|
|
617
|
+
cy.realPress("ArrowDown");
|
|
618
|
+
UDExAssertActiveItem(3);
|
|
619
|
+
cy.get("#select-box").shadow().find("[udex-list-item]").eq(2)
|
|
620
|
+
.should("not.have.attr", "_active-descendant");
|
|
621
|
+
cy.get("#select-box").find("[udex-select-box-item][selected]").should("have.length", 1).and("have.attr", "label", "Java");
|
|
622
|
+
cy.get("#select-box").shadow().find('[aria-live="polite"]').should("have.text", "");
|
|
623
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]').should("be.focused");
|
|
558
624
|
});
|
|
559
625
|
|
|
560
626
|
it("SingleSelect mode - reopening restores focus to the previously selected item", () => {
|
|
@@ -629,14 +695,27 @@ describe("SelectBox", () => {
|
|
|
629
695
|
.should("have.attr", "_active-descendant");
|
|
630
696
|
});
|
|
631
697
|
|
|
632
|
-
|
|
698
|
+
// Updated: keyboard opening announces expanded with the first item active; ArrowDown advances silently to the second.
|
|
699
|
+
it("MultiSelect mode - ArrowDown opens with the first item active and the next ArrowDown activates the next item", () => {
|
|
633
700
|
cy.mount(multiSelect);
|
|
634
701
|
cy.get("#select-box").shadow().find(".udex-text-field__search").focus();
|
|
635
702
|
cy.realPress("ArrowDown");
|
|
636
703
|
|
|
637
704
|
cy.get("#select-box").shadow().find(".udex-select-box__dropdown").should("have.attr", "open");
|
|
705
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]')
|
|
706
|
+
.should("be.focused").and("have.attr", "aria-expanded", "true");
|
|
707
|
+
UDExAssertActiveItem(0);
|
|
708
|
+
cy.get("#select-box").shadow().find('[aria-live="polite"]').should("have.length", 1).and("have.text", "expanded");
|
|
638
709
|
cy.get("#select-box").shadow().find("[udex-list-item]").eq(0)
|
|
639
710
|
.should("have.attr", "_active-descendant");
|
|
711
|
+
|
|
712
|
+
cy.realPress("ArrowDown");
|
|
713
|
+
UDExAssertActiveItem(1);
|
|
714
|
+
cy.get("#select-box").shadow().find("[udex-list-item]").eq(0)
|
|
715
|
+
.should("not.have.attr", "_active-descendant");
|
|
716
|
+
cy.get("#select-box").find("[udex-select-box-item][selected]").should("not.exist");
|
|
717
|
+
cy.get("#select-box").shadow().find('[aria-live="polite"]').should("have.text", "");
|
|
718
|
+
cy.get("#select-box").shadow().find('input[role="combobox"]').should("be.focused");
|
|
640
719
|
});
|
|
641
720
|
|
|
642
721
|
it("MultiSelect mode - selected items do not steal focus from the first item on open", () => {
|
|
@@ -1190,9 +1269,10 @@ describe("SelectBox", () => {
|
|
|
1190
1269
|
cy.get("@select").shadow().find(".udex-text-field__trigger").as("trigger")
|
|
1191
1270
|
|
|
1192
1271
|
cy.get("@select").shadow()
|
|
1193
|
-
.find("udex-list")
|
|
1194
|
-
.find("udex-list-select-all").shadow()
|
|
1195
|
-
.find(
|
|
1272
|
+
.find("[udex-list]")
|
|
1273
|
+
.find("[udex-list-select-all]").shadow()
|
|
1274
|
+
.find('[udex-list-item][part="group-item"]').shadow()
|
|
1275
|
+
.find('[part="title"]')
|
|
1196
1276
|
.should("have.text", "Select All");
|
|
1197
1277
|
});
|
|
1198
1278
|
|
|
@@ -2861,10 +2941,13 @@ describe("SelectBox", () => {
|
|
|
2861
2941
|
.find("[udex-list]").should("have.attr", "aria-multiselectable", "true");
|
|
2862
2942
|
});
|
|
2863
2943
|
|
|
2864
|
-
|
|
2944
|
+
// Updated: the host owns the tree; its shadow container must not create a second tree.
|
|
2945
|
+
it("inner list div is transparent when the host owns the tree role", () => {
|
|
2946
|
+
cy.get("#select-box-tree-regression").shadow()
|
|
2947
|
+
.find("[udex-list]").should("have.attr", "role", "tree");
|
|
2865
2948
|
cy.get("#select-box-tree-regression").shadow()
|
|
2866
2949
|
.find("[udex-list]").shadow()
|
|
2867
|
-
.find("#udex-list").should("have.attr", "role", "
|
|
2950
|
+
.find("#udex-list").should("have.attr", "role", "none");
|
|
2868
2951
|
});
|
|
2869
2952
|
|
|
2870
2953
|
it("group header host has _tree-mode attribute", () => {
|
|
@@ -2880,11 +2963,13 @@ describe("SelectBox", () => {
|
|
|
2880
2963
|
.should("have.attr", "role", "treeitem");
|
|
2881
2964
|
});
|
|
2882
2965
|
|
|
2883
|
-
|
|
2966
|
+
// Updated: selectable popup treeitems expose only Boolean aria-selected on the host.
|
|
2967
|
+
it("child items have Boolean aria-selected and no aria-checked on the host (MultiSelect tree)", () => {
|
|
2884
2968
|
cy.get("#select-box-tree-regression").shadow()
|
|
2885
|
-
.find("udex-list-group-header")
|
|
2886
|
-
.find("udex-list-item").eq(0)
|
|
2887
|
-
.should("have.attr", "aria-
|
|
2969
|
+
.find("[udex-list-group-header]")
|
|
2970
|
+
.find("[udex-list-item]").eq(0)
|
|
2971
|
+
.should("have.attr", "aria-selected", "false")
|
|
2972
|
+
.and("not.have.attr", "aria-checked");
|
|
2888
2973
|
});
|
|
2889
2974
|
|
|
2890
2975
|
it("child items' inner [part=item] div is role=\"presentation\" (host carries the role)", () => {
|
|
@@ -2894,7 +2979,8 @@ describe("SelectBox", () => {
|
|
|
2894
2979
|
.find("[part=item]").should("have.attr", "role", "presentation");
|
|
2895
2980
|
});
|
|
2896
2981
|
|
|
2897
|
-
|
|
2982
|
+
// Updated: decorative checkboxes remain hidden; native selection is owned by the treeitem host.
|
|
2983
|
+
it("child items' checkbox is aria-hidden (tree mode uses host aria-selected)", () => {
|
|
2898
2984
|
cy.get("#select-box-tree-regression").shadow()
|
|
2899
2985
|
.find("udex-list-group-header")
|
|
2900
2986
|
.find("udex-list-item").eq(0).shadow()
|
|
@@ -2902,91 +2988,121 @@ describe("SelectBox", () => {
|
|
|
2902
2988
|
});
|
|
2903
2989
|
});
|
|
2904
2990
|
|
|
2905
|
-
//
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
.
|
|
2991
|
+
// Updated: expanded active groups open silently; other hosts keep the popup fallback, never live item metadata.
|
|
2992
|
+
describe("Select Box supplemental announcements without label echo", () => {
|
|
2993
|
+
const UDExCombobox = () => cy.get("#select-box").shadow().find('input[role="combobox"]');
|
|
2994
|
+
const UDExStatus = () => cy.get("#select-box").shadow().find('[aria-live="polite"]');
|
|
2995
|
+
const UDExActiveHost = () => cy.get("#select-box").shadow().find("[_active-descendant]");
|
|
2996
|
+
|
|
2997
|
+
function UDExAssertActiveHost(UDExRole: string, UDExLabel: string, UDExPosition: number, UDExSize: number, UDExExpectedStatus: "" | "expanded", UDExLevel?: number, UDExAccessibleName = UDExLabel) {
|
|
2998
|
+
UDExActiveHost().should($host => {
|
|
2999
|
+
expect($host).to.have.length(1);
|
|
3000
|
+
expect($host).to.have.attr("role", UDExRole);
|
|
3001
|
+
expect($host).to.have.attr("aria-posinset", String(UDExPosition));
|
|
3002
|
+
expect($host).to.have.attr("aria-setsize", String(UDExSize));
|
|
3003
|
+
expect($host).to.have.attr("aria-label", UDExAccessibleName);
|
|
3004
|
+
if (UDExLevel !== undefined) {
|
|
3005
|
+
expect($host).to.have.attr("aria-level", String(UDExLevel));
|
|
3006
|
+
} else {
|
|
3007
|
+
expect($host).not.to.have.attr("aria-level");
|
|
3008
|
+
}
|
|
3009
|
+
if ($host.is("[udex-list-group-header]")) {
|
|
3010
|
+
expect($host).to.have.attr("aria-label", UDExLabel);
|
|
3011
|
+
} else {
|
|
3012
|
+
expect($host).to.have.attr("label", UDExLabel);
|
|
3013
|
+
}
|
|
3014
|
+
}).then($host => {
|
|
3015
|
+
UDExCombobox().should($input => {
|
|
3016
|
+
const UDExRoot = $input[0].getRootNode() as ShadowRoot;
|
|
3017
|
+
expect($input).to.have.attr("aria-activedescendant", $host[0].id);
|
|
3018
|
+
expect(UDExRoot.getElementById($host[0].id)).to.equal($host[0]);
|
|
3019
|
+
expect(Array.from(UDExRoot.querySelectorAll("[id]")).filter(UDExElement => UDExElement.id === $host[0].id))
|
|
3020
|
+
.to.deep.equal([$host[0]]);
|
|
3021
|
+
});
|
|
3022
|
+
});
|
|
3023
|
+
// Preserve rendered title checks in addition to the complete host aria-label.
|
|
3024
|
+
UDExActiveHost().then($host => {
|
|
3025
|
+
if ($host.is("[udex-list-item]")) {
|
|
3026
|
+
cy.wrap($host).shadow().find(".udex-list__content-wrap").should("have.attr", "aria-label", UDExLabel);
|
|
3027
|
+
cy.wrap($host).shadow().find('[part="title"]').should("have.text", UDExLabel);
|
|
3028
|
+
}
|
|
3029
|
+
});
|
|
3030
|
+
UDExCombobox().should("be.focused");
|
|
3031
|
+
// Updated: drain pending live-region rendering so an empty expectation cannot pass prematurely.
|
|
3032
|
+
cy.then(() => renderFinished());
|
|
3033
|
+
UDExStatus().should($status => {
|
|
3034
|
+
expect($status).to.have.length(1);
|
|
3035
|
+
expect($status.text()).to.equal(UDExExpectedStatus);
|
|
3036
|
+
const UDExSelectBox = ($status[0].getRootNode() as ShadowRoot).host;
|
|
3037
|
+
UDExSelectBox.querySelectorAll("[udex-select-box-item], [udex-select-box-group-header]").forEach(UDExItem => {
|
|
3038
|
+
["label", "supporting-text", "additional-text"].forEach(UDExAttribute => {
|
|
3039
|
+
const UDExName = UDExItem.getAttribute(UDExAttribute);
|
|
3040
|
+
if (UDExName) {
|
|
3041
|
+
expect($status.text(), `status excludes ${UDExAttribute}: ${UDExName}`).not.to.contain(UDExName);
|
|
3042
|
+
}
|
|
3043
|
+
});
|
|
3044
|
+
});
|
|
3045
|
+
});
|
|
3046
|
+
}
|
|
2914
3047
|
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
3048
|
+
// Updated: actionable opening is expanded-only, with level-1 positions and complete names retained natively.
|
|
3049
|
+
it("announces only expanded on flat actionable opening while retaining the complete native name and position", () => {
|
|
3050
|
+
cy.mount(shortComponent);
|
|
3051
|
+
UDExCombobox().realClick();
|
|
3052
|
+
UDExAssertActiveHost("treeitem", "JavaScript", 1, 6, "expanded", 1, "JavaScript Additional Text");
|
|
3053
|
+
UDExCombobox().should("have.attr", "aria-haspopup", "tree");
|
|
3054
|
+
cy.get("#select-box").shadow().find("[udex-list]").should("have.attr", "role", "tree");
|
|
3055
|
+
UDExActiveHost().should("not.have.attr", "aria-expanded");
|
|
3056
|
+
UDExActiveHost().should("have.attr", "aria-selected", "false");
|
|
2920
3057
|
});
|
|
2921
3058
|
|
|
2922
|
-
//
|
|
2923
|
-
|
|
2924
|
-
// a further ArrowDown reaches its first child ("level 1").
|
|
2925
|
-
it("uses tree positional text ('level 0' for the group header, 'level 1' for its child)", () => {
|
|
3059
|
+
// Updated: the expanded group supplies native state; opening and child navigation have no live metadata.
|
|
3060
|
+
it("keeps live status empty on expanded-group opening and child navigation with native positions and selection", () => {
|
|
2926
3061
|
cy.mount(groupHeaderCollapsible);
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
.invoke("text")
|
|
2935
|
-
.should("contain", "level 0");
|
|
2936
|
-
|
|
2937
|
-
// A further ArrowDown reaches the first child -> tree text reports "level 1".
|
|
2938
|
-
cy.get("#select-box").shadow()
|
|
2939
|
-
.find(".udex-text-field__search")
|
|
2940
|
-
.realPress("ArrowDown");
|
|
2941
|
-
|
|
2942
|
-
cy.get("#select-box").shadow()
|
|
2943
|
-
.find('[aria-live="polite"]')
|
|
2944
|
-
.invoke("text")
|
|
2945
|
-
.should("contain", "level 1");
|
|
3062
|
+
UDExCombobox().realClick();
|
|
3063
|
+
UDExAssertActiveHost("treeitem", "Programming Languages", 1, 1, "", 1);
|
|
3064
|
+
UDExActiveHost().should("have.attr", "aria-expanded", "true");
|
|
3065
|
+
UDExActiveHost().should("have.attr", "aria-selected", "false").and("not.have.attr", "aria-checked");
|
|
3066
|
+
cy.realPress("ArrowDown");
|
|
3067
|
+
UDExAssertActiveHost("treeitem", "JavaScript", 1, 2, "", 2, "JavaScript Frontend web development");
|
|
3068
|
+
UDExActiveHost().should("have.attr", "aria-selected", "false").and("not.have.attr", "aria-checked");
|
|
2946
3069
|
});
|
|
2947
3070
|
|
|
2948
|
-
|
|
3071
|
+
// Updated: actionable opening is expanded-only; navigation is silent even on hosts without icons.
|
|
3072
|
+
it("announces expanded on actionable opening, keeps navigation silent and clears the active descendant on Escape", () => {
|
|
2949
3073
|
cy.mount(shortComponent);
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
cy.
|
|
2957
|
-
.find('[aria-live="polite"]')
|
|
2958
|
-
.invoke("text")
|
|
2959
|
-
.should("not.be.empty");
|
|
2960
|
-
|
|
2961
|
-
cy.get("#select-box").shadow()
|
|
2962
|
-
.find(".udex-text-field__search")
|
|
2963
|
-
.realPress("Escape");
|
|
3074
|
+
UDExCombobox().realClick();
|
|
3075
|
+
UDExAssertActiveHost("treeitem", "JavaScript", 1, 6, "expanded", 1, "JavaScript Additional Text");
|
|
3076
|
+
cy.realPress("ArrowDown");
|
|
3077
|
+
UDExAssertActiveHost("treeitem", "Python", 2, 6, "", 1);
|
|
3078
|
+
UDExActiveHost().should("have.attr", "aria-selected", "false");
|
|
3079
|
+
UDExActiveHost().should("not.have.attr", "aria-expanded");
|
|
3080
|
+
cy.realPress("Escape");
|
|
2964
3081
|
|
|
2965
3082
|
cy.get("#select-box").shadow()
|
|
2966
3083
|
.find(".udex-select-box__dropdown")
|
|
2967
3084
|
.should("not.have.attr", "open");
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
.invoke("text")
|
|
2973
|
-
.should("equal", "");
|
|
3085
|
+
UDExActiveHost().should("not.exist");
|
|
3086
|
+
UDExCombobox().should("not.have.attr", "aria-activedescendant");
|
|
3087
|
+
UDExCombobox().should("be.focused");
|
|
3088
|
+
UDExStatus().should("have.text", "");
|
|
2974
3089
|
});
|
|
2975
3090
|
|
|
2976
|
-
|
|
3091
|
+
// Updated: plain flat MultiSelect announces expanded only on opening; option navigation remains silent.
|
|
3092
|
+
it("announces expanded on flat unselected MultiSelect opening and keeps navigation status silent", () => {
|
|
2977
3093
|
cy.mount(multiSelect);
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
.should("contain.text", "Unselected");
|
|
3094
|
+
UDExCombobox().realClick();
|
|
3095
|
+
UDExCombobox().should("have.attr", "aria-haspopup", "listbox");
|
|
3096
|
+
cy.get("#select-box").shadow().find("[udex-list]").should("have.attr", "role", "listbox");
|
|
3097
|
+
UDExAssertActiveHost("option", "JavaScript", 1, 15, "expanded", undefined, "JavaScript Frontend web development");
|
|
3098
|
+
cy.realPress("ArrowDown");
|
|
3099
|
+
UDExAssertActiveHost("option", "Python", 2, 15, "", undefined, "Python Used in data analysis");
|
|
3100
|
+
UDExActiveHost().should("have.attr", "aria-selected", "false");
|
|
3101
|
+
UDExActiveHost().should("not.have.attr", "aria-checked");
|
|
2987
3102
|
});
|
|
2988
3103
|
|
|
2989
|
-
|
|
3104
|
+
// Updated: preselection remains native; opening announces expanded without repeating the selected option's name.
|
|
3105
|
+
it("announces only expanded when a preselected flat MultiSelect option is initially active", () => {
|
|
2990
3106
|
const checkedMultiSelect = <div style="width: 350px; position:relative;">
|
|
2991
3107
|
<UDExSelectBox
|
|
2992
3108
|
id="select-box"
|
|
@@ -3000,18 +3116,15 @@ describe("SelectBox", () => {
|
|
|
3000
3116
|
</div>;
|
|
3001
3117
|
|
|
3002
3118
|
cy.mount(checkedMultiSelect);
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
// suffix is "Selected".
|
|
3009
|
-
cy.get("#select-box").shadow()
|
|
3010
|
-
.find('[aria-live="polite"]')
|
|
3011
|
-
.should("contain.text", "Selected");
|
|
3119
|
+
UDExCombobox().realClick();
|
|
3120
|
+
UDExAssertActiveHost("option", "JavaScript", 1, 3, "expanded", undefined, "JavaScript Frontend web development");
|
|
3121
|
+
UDExActiveHost().should("have.attr", "aria-selected", "true");
|
|
3122
|
+
UDExActiveHost().should("not.have.attr", "aria-checked");
|
|
3123
|
+
cy.get("#select-box").find('[udex-select-box-item][label="JavaScript"]').should("have.attr", "selected");
|
|
3012
3124
|
});
|
|
3013
3125
|
|
|
3014
|
-
|
|
3126
|
+
// Updated: an initially collapsed header still needs the expanded popup fallback; its native group stays collapsed.
|
|
3127
|
+
it("announces only expanded on pointer opening of a collapsed group and retains native header state", () => {
|
|
3015
3128
|
const collapsedGroupHeader = <div style="width: 350px; position:relative;">
|
|
3016
3129
|
<UDExSelectBox
|
|
3017
3130
|
id="select-box"
|
|
@@ -3025,34 +3138,25 @@ describe("SelectBox", () => {
|
|
|
3025
3138
|
</div>;
|
|
3026
3139
|
|
|
3027
3140
|
cy.mount(collapsedGroupHeader);
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
.find('[aria-live="polite"]')
|
|
3037
|
-
.invoke("text")
|
|
3038
|
-
.should("contain", "level 0")
|
|
3039
|
-
.and("contain", "collapsed");
|
|
3141
|
+
UDExCombobox().realClick();
|
|
3142
|
+
UDExAssertActiveHost("treeitem", "Programming Languages", 1, 1, "expanded", 1);
|
|
3143
|
+
UDExActiveHost().should("have.attr", "aria-expanded", "false");
|
|
3144
|
+
cy.realPress("ArrowDown");
|
|
3145
|
+
UDExAssertActiveHost("treeitem", "Programming Languages", 1, 1, "", 1);
|
|
3146
|
+
UDExActiveHost().should("have.attr", "aria-expanded", "false");
|
|
3147
|
+
UDExActiveHost().should("have.attr", "aria-selected", "false").and("not.have.attr", "aria-checked");
|
|
3148
|
+
UDExActiveHost().should("have.attr", "collapsed");
|
|
3040
3149
|
});
|
|
3041
3150
|
|
|
3042
|
-
|
|
3151
|
+
// Updated: native expanded-header state replaces the popup fallback, rather than duplicating expansion live.
|
|
3152
|
+
it("keeps live status empty on pointer opening and retains native expanded header state", () => {
|
|
3043
3153
|
// groupHeaderCollapsible starts expanded (no `collapsed` attribute).
|
|
3044
3154
|
cy.mount(groupHeaderCollapsible);
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
// "level 0" and the state suffix is "expanded".
|
|
3051
|
-
cy.get("#select-box").shadow()
|
|
3052
|
-
.find('[aria-live="polite"]')
|
|
3053
|
-
.invoke("text")
|
|
3054
|
-
.should("contain", "level 0")
|
|
3055
|
-
.and("contain", "expanded");
|
|
3155
|
+
UDExCombobox().realClick();
|
|
3156
|
+
UDExAssertActiveHost("treeitem", "Programming Languages", 1, 1, "", 1);
|
|
3157
|
+
UDExActiveHost().should("have.attr", "aria-expanded", "true");
|
|
3158
|
+
UDExActiveHost().should("have.attr", "aria-selected", "false").and("not.have.attr", "aria-checked");
|
|
3159
|
+
UDExActiveHost().should("not.have.attr", "collapsed");
|
|
3056
3160
|
});
|
|
3057
3161
|
});
|
|
3058
3162
|
|
|
@@ -3183,14 +3287,10 @@ describe("SelectBox", () => {
|
|
|
3183
3287
|
});
|
|
3184
3288
|
});
|
|
3185
3289
|
|
|
3186
|
-
//
|
|
3187
|
-
//
|
|
3188
|
-
// udex-list__group-content class on the raw body div, or by checking isGroup +
|
|
3189
|
-
// collapsible + !modeMultiSelect on the shadow-DOM-retargeted HOST element —
|
|
3190
|
-
// sets the group header as the active descendant, and redirects DOM focus back
|
|
3191
|
-
// to the search input.
|
|
3290
|
+
// Host-ARIA group rows have no tab stop. Clicking their body must activate the
|
|
3291
|
+
// header directly while DOM focus stays on the combobox input.
|
|
3192
3292
|
describe("Select Box collapsible single-select group header click", () => {
|
|
3193
|
-
it("clicking the body of a collapsible single-select group header
|
|
3293
|
+
it("clicking the body of a collapsible single-select group header keeps DOM focus on the search input", () => {
|
|
3194
3294
|
cy.mount(groupHeaderCollapsibleSingleSelect);
|
|
3195
3295
|
cy.get("#select-box").shadow().find(".udex-text-field__trigger").click();
|
|
3196
3296
|
|
|
@@ -3198,8 +3298,10 @@ describe("SelectBox", () => {
|
|
|
3198
3298
|
.find(".udex-select-box__dropdown")
|
|
3199
3299
|
.should("have.attr", "open");
|
|
3200
3300
|
|
|
3201
|
-
|
|
3202
|
-
|
|
3301
|
+
cy.get("#select-box").shadow().find(".udex-text-field__search").then($input => {
|
|
3302
|
+
$input[0].addEventListener("blur", cy.stub().as("headerClickBlur"));
|
|
3303
|
+
});
|
|
3304
|
+
// Use native mouse events to catch transient focus loss.
|
|
3203
3305
|
// Click left side to avoid the collapse icon on the right.
|
|
3204
3306
|
cy.get("#select-box").shadow()
|
|
3205
3307
|
.find("[udex-list-group-header]")
|
|
@@ -3207,14 +3309,13 @@ describe("SelectBox", () => {
|
|
|
3207
3309
|
.find("div[part='group-item'].udex-list__group-content")
|
|
3208
3310
|
.realClick({ position: "left" });
|
|
3209
3311
|
|
|
3210
|
-
// handleInputFocusOut detects the group header HOST (via isGroup + collapsible +
|
|
3211
|
-
// !modeMultiSelect after shadow DOM retargeting) and calls _search.focus().
|
|
3212
3312
|
cy.get("#select-box").shadow()
|
|
3213
3313
|
.find(".udex-text-field__search")
|
|
3214
3314
|
.should("be.focused");
|
|
3315
|
+
cy.get("@headerClickBlur").should("not.have.been.called");
|
|
3215
3316
|
});
|
|
3216
3317
|
|
|
3217
|
-
it("clicking the body
|
|
3318
|
+
it("clicking the body activates the header and arrow navigation uses it as starting point", () => {
|
|
3218
3319
|
cy.mount(groupHeaderCollapsibleSingleSelect);
|
|
3219
3320
|
cy.get("#select-box").shadow().find(".udex-text-field__trigger").click();
|
|
3220
3321
|
|
|
@@ -3222,8 +3323,13 @@ describe("SelectBox", () => {
|
|
|
3222
3323
|
.find(".udex-select-box__dropdown")
|
|
3223
3324
|
.should("have.attr", "open");
|
|
3224
3325
|
|
|
3225
|
-
//
|
|
3226
|
-
//
|
|
3326
|
+
// Start on a leaf so this checks pointer activation rather than initial
|
|
3327
|
+
// dropdown activation accidentally supplying the same group header.
|
|
3328
|
+
cy.get("#select-box").shadow().find("[_active-descendant]").should("have.length", 1);
|
|
3329
|
+
cy.realPress("End");
|
|
3330
|
+
cy.get("#select-box").shadow().find("[udex-list-item]").eq(1)
|
|
3331
|
+
.should("have.attr", "_active-descendant");
|
|
3332
|
+
|
|
3227
3333
|
// Click left side to avoid the collapse icon on the right.
|
|
3228
3334
|
cy.get("#select-box").shadow()
|
|
3229
3335
|
.find("[udex-list-group-header]")
|
|
@@ -3234,6 +3340,8 @@ describe("SelectBox", () => {
|
|
|
3234
3340
|
cy.get("#select-box").shadow()
|
|
3235
3341
|
.find(".udex-text-field__search")
|
|
3236
3342
|
.should("be.focused");
|
|
3343
|
+
cy.get("#select-box").shadow().find("[udex-list-group-header]")
|
|
3344
|
+
.should("have.attr", "_active-descendant");
|
|
3237
3345
|
|
|
3238
3346
|
// ArrowDown (via onKeyDownSearch) advances from the group header active
|
|
3239
3347
|
// descendant to the FIRST list item (United States) — not back to item 0 /
|