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
Open

Conversation

rahimabdi
Copy link
Contributor

@rahimabdi rahimabdi commented Jul 12, 2024

Closes accname #212

Update text node definition using the DOM exclusive text node definition.

Copy link

netlify bot commented Jul 12, 2024

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit bde4f90
🔍 Latest deploy log https://app.netlify.com/sites/wai-aria/deploys/6699a7e3cc9d660008750ee3
😎 Deploy Preview https://deploy-preview-2274--wai-aria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -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.

@spectranaut spectranaut changed the title [accname] Update text node definition Update text node definition Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarifying "text node" definition (step 2G)
3 participants