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

Remove accname/name/comp_text_node.html tests that assume &nbsp trimming #115

Closed
Tracked by #90
dandclark opened this issue Mar 20, 2024 · 10 comments · Fixed by web-platform-tests/wpt#45794
Closed
Tracked by #90
Assignees
Labels

Comments

@dandclark
Copy link

Test List

The following tests in accname/name/comp_text_node.html:

  • span[role=button] with text node, with leading/trailing non-breaking space
  • div[role=heading] with text node, with leading/trailing non-breaking space
  • button with text node, with leading/trailing non-breaking space
  • heading with text node, with leading/trailing non-breaking space
  • link with text node, with leading/trailing non-breaking space

Rationale

The tests all validate that   at the beginning and end of a node's computed name is trimmed, e.g.:

<span role="button" tabindex="0" class="ex" data-expectedlabel="button&nbsp;label" data-testname="span[role=button] with text node, with leading/trailing non-breaking space">&nbsp;button&nbsp;label&nbsp;</span>
Chromium and Safari fail the tests because they do not trim the &nbsp;s.

The accname computation steps do not say anything about trimming whitespace from the computed result. I found an older issue seeking clarification about this that is not yet resolved: w3c/accname#95. The WPT utils used for these tests do some of their own whitespace normalizing (added here) but that explicitly does not include non-breaking spaces.

Given that the behavior validated by the tests is not stated in the spec, and web-platform-tests/interop#95 does not seem close to a resolution, I'm proposing that these tests be removed from Interop2024.

cc @cookiecrook

@jgraham
Copy link
Contributor

jgraham commented Apr 4, 2024

@zcorpan @jcsteh do you have any input on this one?

@cookiecrook
Copy link
Collaborator

Who can move this to https://github.com/web-platform-tests/interop-accessibility ? IIRC the test predates a spec clarification that it should be ASCII whitespace.

@nt1m nt1m transferred this issue from web-platform-tests/interop Apr 4, 2024
@cookiecrook
Copy link
Collaborator

Thanks @nt1m

@nt1m
Copy link
Member

nt1m commented Apr 4, 2024

Sounds like both the spec & test will be updated here, from what I'm hearing.

@cookiecrook
Copy link
Collaborator

Correct. That is the consensus from the ARIA WG call.

@cookiecrook
Copy link
Collaborator

@jnurthen asks if there are similar tests for trimming value of html alt attr...

@zcorpan
Copy link
Member

zcorpan commented Apr 5, 2024

For img alt, HTML differentiates the empty string from any other value -- only the empty string is special.

https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element%3Athe-img-element-11

@cookiecrook cookiecrook self-assigned this Apr 18, 2024
@cookiecrook
Copy link
Collaborator

I plan to work on this imminently.

@cookiecrook
Copy link
Collaborator

FWIW, I don't believe a counterpart spec change is needed... Both the published version and the editor's draft reference ASCII whitespace (which does not include non-breaking space) in this step of the AccName algorithm.

https://www.w3.org/TR/accname-1.2/#comp_label
https://w3c.github.io/accname/#comp_label

@cookiecrook
Copy link
Collaborator

cookiecrook commented Apr 18, 2024

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Apr 29, 2024
…abel tests, a=testonly

Automatic update from web-platform-tests
Interop: Remove invalid nbsp trimming label tests (#45794)

Resolves web-platform-tests/interop-accessibility#115
--

wpt-commits: f90c59598faaad9c60f43fff9db4e9873c7a6b54
wpt-pr: 45794
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Apr 30, 2024
…abel tests, a=testonly

Automatic update from web-platform-tests
Interop: Remove invalid nbsp trimming label tests (#45794)

Resolves web-platform-tests/interop-accessibility#115
--

wpt-commits: f90c59598faaad9c60f43fff9db4e9873c7a6b54
wpt-pr: 45794
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this issue Jun 1, 2024
…abel tests, a=testonly

Automatic update from web-platform-tests
Interop: Remove invalid nbsp trimming label tests (#45794)

Resolves web-platform-tests/interop-accessibility#115
--

wpt-commits: f90c59598faaad9c60f43fff9db4e9873c7a6b54
wpt-pr: 45794
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants