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

Update text node definition #2274

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
8 changes: 4 additions & 4 deletions accname/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ <h2>Name and Description</h2>
</dd>
<dt>contents</dt>
<dd>
name is generated from the Text [=nodes=] associated with the [=element=]. Although this may be allowed in addition to "author" in some <a class="termref">roles</a>, "content" is used only
if higher priority "author" features are not provided. Priority is defined by the <a href="#mapping_additional_nd_te">text equivalent computation</a> algorithm.
name is generated from the [=exclusive Text node|text node=] associated with the [=element=]. Although this may be allowed in addition to "author" in some <a class="termref">roles</a>,
Copy link
Contributor

@smockle smockle Jul 18, 2024

Choose a reason for hiding this comment

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

This changes from “the Text nodes” (plural) to “the text node” (singular)—is that intended? An accessible name can be generated from multiple text nodes.

For example, this URL—

data:text/html,<h1>Hello, <!--COMMENT-->world!</h1>

—plus this JavaScript—

getAccessibleName(document.querySelector("h1"))
// 'Hello, world!'

document.querySelector("h1").childNodes
// NodeList(3) [text, comment, text]

Copy link
Contributor Author

@rahimabdi rahimabdi Jul 18, 2024

Choose a reason for hiding this comment

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

Agreed "text nodes" should be plural, thank you @smockle. This does introduce inconsistency for the ReSpec linking; aliases are strongly discouraged (let alone differently aliased links pointing to the same thing) so curious if anyone disagrees with simply making it plural while in other cases we use "text node" as the link.

Changed as part of bde4f90.

"content" is used only if higher priority "author" features are not provided. Priority is defined by the <a href="#mapping_additional_nd_te">text equivalent computation</a> algorithm.
</dd>
<dt>prohibited</dt>
<dd>
Expand Down Expand Up @@ -706,8 +706,8 @@ <h4>Computation steps</h4>
</div>
</li>
<li id="comp_text_node">
<span id="step2G"><!-- Don't link to this legacy numbered ID. --></span><em>Text Node:</em> Otherwise, if the <code>current node</code> is a Text [=Node=], return its textual
contents.
<span id="step2G"><!-- Don't link to this legacy numbered ID. --></span><em>Text Node:</em> Otherwise, if the <code>current node</code> is a [=exclusive Text node|text node=], return
jnurthen marked this conversation as resolved.
Show resolved Hide resolved
its textual contents.
</li>
<li id="comp_recursive_name_from_content">
<span id="step2H"><!-- Don't link to this legacy numbered ID. --></span><em>Recursive Name From Content:</em> Otherwise, if the <code>current node</code> is a descendant of an
Expand Down