Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/core/makeup-active-descendant/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/core/makeup-active-descendant/index.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ui/makeup-combobox/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ui/makeup-combobox/index.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ui/makeup-listbox-button/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ui/makeup-listbox-button/index.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ui/makeup-listbox/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ui/makeup-listbox/index.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/makeup-active-descendant/dist/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function onModelInit(e) {
const itemEl = items[toIndex];
if (itemEl) {
itemEl.classList.add(this._options.activeDescendantClassName);
this._focusEl.setAttribute("aria-activedescendant", itemEl.id);
this._focusEl.setAttribute("aria-activedescendant", (0, _makeupNextId.default)(itemEl));
}
this._el.dispatchEvent(new CustomEvent("activeDescendantInit", {
detail: e.detail
Expand Down
2 changes: 1 addition & 1 deletion packages/core/makeup-active-descendant/dist/mjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function onModelInit(e) {
const itemEl = items[toIndex];
if (itemEl) {
itemEl.classList.add(this._options.activeDescendantClassName);
this._focusEl.setAttribute("aria-activedescendant", itemEl.id);
this._focusEl.setAttribute("aria-activedescendant", nextID(itemEl));
}
this._el.dispatchEvent(new CustomEvent("activeDescendantInit", { detail: e.detail }));
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/makeup-active-descendant/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function onModelInit(e) {

if (itemEl) {
itemEl.classList.add(this._options.activeDescendantClassName);
this._focusEl.setAttribute("aria-activedescendant", itemEl.id);
this._focusEl.setAttribute("aria-activedescendant", nextID(itemEl));
}

this._el.dispatchEvent(new CustomEvent("activeDescendantInit", { detail: e.detail }));
Expand Down
24 changes: 24 additions & 0 deletions packages/core/makeup-active-descendant/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,30 @@ describe("given a list of 3 hidden items in hierarchial relationship", () => {
});
/* END STATIC MODEL SIZE TESTS */

describe("given 3 items instantiated with autoInit", () => {
beforeEach(() => {
document.body.innerHTML = `
<div class="widget">
<input type="text"/>
<ul>
<li>Button 1</li>
<li>Button 2</li>
<li>Button 3</li>
</ul>
</div>
`;
widgetEl = document.querySelector(".widget");
focusEl = widgetEl.querySelector("input");
containerEl = widgetEl.querySelector("ul");
testActiveDescendant = createLinear(widgetEl, focusEl, containerEl, "li", { autoInit: 1 });
});

it("should point aria-activedescendant at the initial item's id", () => {
const itemEl = containerEl.querySelectorAll("li")[1];
expect(focusEl.getAttribute("aria-activedescendant")).toBe(itemEl.id);
});
});

/* BEGIN ARROW KEY TESTS */

describe("given 3 items with default options in programmatic relationship", () => {
Expand Down
Loading