Gallery Block: Add toolbar button to add a caption#47325
Merged
Conversation
|
Size Change: +167 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 10cf94d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3973822524
|
t-hamano
commented
Jan 21, 2023
Comment on lines
-143
to
+144
| await expect( caption ).toBeVisible(); | ||
| await caption.click(); | ||
| await expect( caption ).toBeFocused(); |
Contributor
Author
There was a problem hiding this comment.
Pressing the caption button brings focus to the caption textbox automatically.
Therefore, I believe This is more reasonable than tobeVisible.
Contributor
Author
|
@alexstine |
This was referenced Feb 6, 2023
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes: #45857
Related to: #44965, #45112
What?
This PR adds a toggle toolbar item on the gallery block toolbar to add/remove a caption.
Why?
To unify the UI with the changes made in #44965. At the same time, accessibility regarding focus on keyboard operations will be improved.
How?
The implementation is based on what is done in the image block.
Testing Instructions
I have confirmed that the focus is lost from the gallery block at this time. However, since this issue also occurs in the latest trunk and I reported in Gallery Block: Focus is lost after inserting images #47326.
68a952592a03d21d0f55f47b3c12f746.mp4
Testing Instructions for Keyboard
Use the following markup for testing:
Test Data
Use the up and down keys to make sure that the focus is correctly moved on the block and RichText area.
d2bf032318d04ce35d1e61f98aa86b16.mp4