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: Name From Contents Tests #42354

Merged

Conversation

cookiecrook
Copy link
Contributor

@cookiecrook cookiecrook commented Oct 5, 2023

@cookiecrook cookiecrook self-assigned this Oct 5, 2023
@cookiecrook cookiecrook marked this pull request as ready for review October 6, 2023 00:12
@sivakusayan
Copy link
Contributor

sivakusayan commented Oct 6, 2023

Would it be useful to add tests on whether whitespace should be added around inline-flex and inline-grid elements?
I'm guessing those cases should also add whitespace around them, but I want to make sure before patching Blink.

@cookiecrook
Copy link
Contributor Author

cookiecrook commented Oct 6, 2023

Would it be useful to add tests on whether whitespace should be added around inline-flex and inline-grid elements?

You're probably right, but we should add tests after an issue resolution, or at least in another PR after this one lands. (A lot more of grid/flex needs to be tested for accessibility.)

Will you file a new AccName issue? There are a bunch of outstanding issues in the AccName whitespace project.

Given that CSS will continue to change, I'd rather a term be defined by the CSS editors, and cross-referenced in ARIA. Even the inline-block example is unspecified now, but I did get @aleventhal to confirm my expectation this morning.

[Update: I previously linked some related, but separate issues.]

Copy link
Contributor

@rahimabdi rahimabdi left a comment

Choose a reason for hiding this comment

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

Done, added comments.

Copy link
Contributor Author

@cookiecrook cookiecrook left a comment

Choose a reason for hiding this comment

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

Commits addressing most of Rahium's feedback.

accname/name/comp_name_from_content.html Outdated Show resolved Hide resolved
accname/name/comp_name_from_content.html Show resolved Hide resolved
accname/name/comp_name_from_content.html Show resolved Hide resolved
accname/name/comp_name_from_content.html Show resolved Hide resolved
accname/name/comp_name_from_content.html Show resolved Hide resolved
accname/name/comp_name_from_content.html Show resolved Hide resolved
accname/name/comp_name_from_content.html Show resolved Hide resolved
aarongable pushed a commit to chromium/chromium that referenced this pull request Oct 10, 2023
While not formalized in the AccName spec yet, there are discussions about adding white-space around inline-block elements.

- w3c/accname#205
- w3c/accname#15
- w3c/accname#3

This change will make Chromium add whitespace around inline-block, inline-grid, inline-table, and inline-flex elements when computing Name from Content. This will let us pass the WPT tests that are in progress of being written: web-platform-tests/wpt#42354

Notes:

- The WPT tests only mention inline-block, and there is no mention of the other inline-* properties yet. I think it's OK that this patch adds whitespace around other inline-* display properties (probably moreso than inline-block) because those properties define special formatting rules for their children, but let me know if you disagree and I can special-case this logic for inline-block.

- It seems that <math> elements have an AtomicInline display type, similar to the other inline-* display types. This means that we start outputting whitespace around <math> elements when computing name from content as well. This feels fine, but as before, let me know if you disagree and I can hardcode what cases are OK. (As an aside, something seems broken with Name from Content when children are MathML? It's preexisting, and should probably be fixed in another CL)

Change-Id: I2a4fc3cf137de5167d160860c1bda5151b38277d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4921470
Commit-Queue: Aaron Leventhal <[email protected]>
Reviewed-by: Aaron Leventhal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1207629}
@rahimabdi rahimabdi self-requested a review October 10, 2023 22:26
Copy link
Contributor

@rahimabdi rahimabdi left a comment

Choose a reason for hiding this comment

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

Completed 2nd round of review.

@cookiecrook cookiecrook merged commit 27a9b21 into web-platform-tests:master Oct 10, 2023
@cookiecrook cookiecrook deleted the comp_name_from_content branch October 10, 2023 23:02
cookiecrook added a commit to cookiecrook/wpt that referenced this pull request Oct 11, 2023
Co-authored-by: Rahim Abdi

New tests for the "name from content" portions of the AccName "name computation" algorithm.
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 this pull request may close these issues.

AccName: tests/todos in accname/name/comp_name_from_content
4 participants