A11Y: "more" nav link should use aria-expanded (#23613)
This commit is contained in:
parent
aa9510a731
commit
1d14474e1d
|
@ -8,6 +8,7 @@
|
|||
@action={{this.toggleSectionLinks}}
|
||||
@label="sidebar.more"
|
||||
class="btn-flat sidebar-more-section-links-details-summary"
|
||||
aria-expanded={{if this.open "true" "false"}}
|
||||
/>
|
||||
</li>
|
||||
|
||||
|
|
|
@ -60,6 +60,13 @@ acceptance("Sidebar - Logged on user - Community Section", function (needs) {
|
|||
"additional section links are displayed"
|
||||
);
|
||||
|
||||
assert.ok(
|
||||
exists(
|
||||
".sidebar-section[data-section-name='community'] .sidebar-more-section-links-details-summary[aria-expanded='true']"
|
||||
),
|
||||
"aria-expanded toggles to true when additional links are displayed"
|
||||
);
|
||||
|
||||
await click(
|
||||
".sidebar-section[data-section-name='community'] .sidebar-more-section-links-details-summary"
|
||||
);
|
||||
|
@ -83,6 +90,13 @@ acceptance("Sidebar - Logged on user - Community Section", function (needs) {
|
|||
),
|
||||
"additional section links are hidden when clicking outside"
|
||||
);
|
||||
|
||||
assert.ok(
|
||||
exists(
|
||||
".sidebar-section[data-section-name='community'] .sidebar-more-section-links-details-summary[aria-expanded='false']"
|
||||
),
|
||||
"aria-expanded toggles to false when additional links are hidden"
|
||||
);
|
||||
});
|
||||
|
||||
test("clicking on everything link", async function (assert) {
|
||||
|
|
Loading…
Reference in New Issue