Comment Detail: Fix content cell elements not resizing in AX size #17464
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refs #17087
As titled, this PR now ensures that:
To note: I've tried to fix an issue with VoiceOver but to no avail. The screen reader somehow jumps to the top of the screen again after reading the contents of the web view. It looks like WKWebView is buggy (just my luck), and after loading the HTML content, somehow the accessibility parent of the web view got reassigned. I believe this is what caused the screen reader to "jump".
The highlighted element is the table view container. As you can see, there are five elements. The first one is the comment header, the second one is the content cell, and so on. Next is the hierarchy for the content cell:
Above is the content cell element unwrapped. You can see all the accessible elements there in the content cell1, and the one that I highlighted is a group for the web view. Next, I'll go deeper into the web view and this is what I got:
"Hey there." is the comment content. As you can see, it's somehow nested right under
SimulatorKit.SimDisplayRenderableView
, which is almost at the very top of the hierarchy. This is why the screen reader won't continue after reading the contents of the web view. Sigh.I have tried a lot of things to fix this and to the point of accessing the private
WKContentView
class of WKWebView to see if I could apply some hack or something, but nope. This gives me more reason to create a standalone, reproducible project and submit a radar. 😅To test
newCommentDetail
feature flag.Regression Notes
Potential unintended areas of impact
n/a. Feature is unreleased.
What I did to test those areas of impact (or what existing automated tests I relied on)
n/a. Feature is unreleased.
What automated tests I added (or what prevented me from doing so)
n/a. Feature is unreleased.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Footnotes
There's also a strange ordering issue here. Somehow the web view element is placed after the Reply and Like button. 🤔 ↩