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

AccName: reconsider appending space between inline text nodes #193

Open
cookiecrook opened this issue Apr 25, 2023 · 3 comments
Open

AccName: reconsider appending space between inline text nodes #193

cookiecrook opened this issue Apr 25, 2023 · 3 comments

Comments

@cookiecrook
Copy link
Contributor

cookiecrook commented Apr 25, 2023

In review for WPT /accname/name/comp_text_node.html

<h2 class="ex" data-expectedlabel="heading label" data-testname="heading with text/comment/text nodes" id="labelTest1">
  heading<!-- with non-text node splitting concatenated text nodes -->label<!-- [sic] no extra spaces around first comment -->
</h2> 

WebKit results in PASS: expected "heading label" and got "heading label"
Chrome results in FAIL: expected "heading label" but got "headinglabel"

Discrepancy is that the AccName comp uses the term node, and these are two text nodes joined by a comment node and no additional whitespace.

Even if WebKit is to spec here, Chromium's implementation allows authors to choose whether they want the space, while WebKit always joins on a space, according to the spec. Worth revisiting?

Skipping this test in WPT for now.

  • If this results in a spec change, please raise a new issue in AccName to update the WPT test, or
  • If this results in no spec change, pleas assign back to me and I'll used this one to reinstate the test as written, confirming the WebKit behavior, not the Chromium behavior.
@cookiecrook
Copy link
Contributor Author

cookiecrook commented Oct 6, 2023

Related to #205. I'm going to check in the WPT test using the Chrome behavior, since that's what the editors have indicated should happen, even though it's not in the spec yet.

@cookiecrook cookiecrook changed the title AccName: reconsider appending space between text nodes and comment nodes AccName: reconsider appending space between inline text nodes Oct 6, 2023
@accdc
Copy link
Contributor

accdc commented Oct 11, 2023

Personally I would expect "headinglabel" to be correct, because a comment is not actually renderable as anything and is actually supposed to be entirely ignored within the rendered page structure, so there would be no value in including this for any type of additional processing with AccName. That would be like processing <input type="hidden"> which wouldn't make any sense either.

If this makes sense to others we can clarify it within the spec text.

@cookiecrook
Copy link
Contributor Author

Okay. I've updated the tests to support your stated change here, so WebKit is currently failing the tests (to be linked once WPT is merged), despite it being the only implementation to match the spec. web-platform-tests/wpt#42407

Please update the spec soon to match this new expectation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants