Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference numbering issues on Client Side Scripting chapter #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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 asciidoc/CH09_ScriptingInAHypermediaApplication.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ function overflowMenu(subtree = document) {
subtree.querySelectorAll("[data-overflow-menu]").forEach(menuRoot => { <1>
const
button = menuRoot.querySelector("[aria-haspopup]"), <2>
menu = menuRoot.querySelector("[role=menu]"), <2>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplication was intentional, as both of these lines are examples of using ARIA.

menu = menuRoot.querySelector("[role=menu]"),
items = [...menu.querySelectorAll("[role=menuitem]")]; <3>
});
}
Expand Down
6 changes: 3 additions & 3 deletions ch09-client-side-scripting.typ
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ Here is what our code looks like now:
#figure[
```js
// counter.js <1>
document.querySelectorAll("[data-counter]") <1>
document.querySelectorAll("[data-counter]") <2>
.forEach(el => {
const
output = el.querySelector("[data-counter-output]"),
Expand Down Expand Up @@ -658,8 +658,8 @@ function overflowMenu(tree = document) {
tree.querySelectorAll("[data-overflow-menu]").forEach(menuRoot => { <1>
const
button = menuRoot.querySelector("[aria-haspopup]"), <2>
menu = menuRoot.querySelector("[role=menu]"), <3>
items = [...menu.querySelectorAll("[role=menuitem]")];
menu = menuRoot.querySelector("[role=menu]"),
items = [...menu.querySelectorAll("[role=menuitem]")]; <3>
});
}

Expand Down