Columns block: fix arrow up into it#55197
Conversation
|
Size Change: +174 B (0%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in f54560f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6467783207
|
jorgefilipecosta
left a comment
There was a problem hiding this comment.
The code looks good and worked well on the test I did 👍
andrewserong
left a comment
There was a problem hiding this comment.
Nice fix! This is testing well for me manually, too.
I tried kicking off the e2e tests again, but they're still failing. From the error message, I think some other tests might need updating as one of the checks for the Add block button now resolves to two elements instead of one, since opacity is being used instead of visibility?
Here's the error message:
1) [chromium] › editor/various/writing-flow.spec.js:24:2 › Writing Flow (@Firefox, https://github.com/WebKit) › Should navigate inner blocks with arrow keys
Error: locator.click: Error: strict mode violation: locator('role=button[name="Add block"i]') resolved to 2 elements:
1) <button type="button" aria-haspopup="true" aria-expanded…>…</button> aka getByRole('document', { name: 'Block: Column (1 of 2)' }).getByRole('button', { name: 'Add block' })
2) <button type="button" aria-haspopup="true" aria-expanded…>…</button> aka getByRole('document', { name: 'Block: Column (2 of 2)' }).getByRole('button', { name: 'Add block' })
In the WritingFlowUtils class, the addDemoContent function looks for the add block button here:
Add block button that is a child of the particular column block?
f54560f to
b08890d
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: jeryj <jeryj@git.wordpress.org>
What?
Fixes #51554. This is a regression caused by #43513. Cc @jasmussen
Why?
How?
Fixed by using opacity instead.
visibility: noneprevents the browser from setting focus. Additionally, it should be visible when the inserter button is focussed.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast