Opened 8 months ago
Closed 4 months ago
#63126 closed enhancement (fixed)
Theme preview model and Media library model having issues with Shift/Ctrl + Shift next and previous arrows.
| Reported by: | | Owned by: | |
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | 6.7.2 |
| Component: | Themes | Keywords: | has-patch has-test-info commit |
| Focuses: | accessibility | Cc: |
Description
When we open the theme preview model and try to select text using the Shift/Ctrl+Shift with a left and right arrow then the theme modal switches the theme instead of the selecting text.
Screen recording - https://www.awesomescreenshot.com/video/37791980
Attachments (3)
Change History (20)
#3
@
8 months ago
- Keywords has-testing-info added
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/63126/63126.patch
Environment
- WordPress: 6.8-beta3-60042-src
- PHP: 8.2.25
- Server: nginx/1.27.2
- Database: mysqli (Server: 8.4.2 / Client: mysqlnd 8.2.25)
- Browser: Chrome 134.0.0.0
- OS: Linux
- Theme: Twenty Twenty-Five 1.1
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
#4
@
8 months ago
- Milestone changed from Awaiting Review to 6.9
Hi @praful2111. Thanks for the report and for including a patch!
I can reproduce the issue and confirmed that this was existing behavior in 6.7. Given that we're so close to the release deadline for 6.8, I'm adding this to the 6.9 milestone for consideration.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
8 months ago
#6
@
8 months ago
- Owner set to joedolson
- Status changed from new to accepted
The same issue occurs in the media library modal. We can probably resolve both in this ticket; but if it proves to be a significantly different solution, we should open a separate ticket.
#7
@
8 months ago
- Summary changed from Theme preview model having issues with Shift/Ctrl + Shift next and previous arrows. to Theme preview model and Media library model having issues with Shift/Ctrl + Shift next and previous arrows.
Hi @joedolson Thanks for pointing that out!
I've created a patch that should resolve the issue in the media library model.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
6 months ago
#10 in reply to: ↑ description
@
6 months ago
Replying to praful2111:
Screen recording - https://www.awesomescreenshot.com/video/37791980
screen recording not found. You are requested to check.
This ticket was mentioned in Slack in #core-test by boniu91. View the logs.
6 months ago
#12
@
5 months ago
- Keywords needs-unit-tests added
Bug Reproduction and Test Report
Description
✅ This report validates that the bug exists as reported and the indicated patch works as expected.
Patch tested: 63126-theme-and-edit-attachments.patch
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Firefox 139.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- 🐞 Bug reproduction: Log in to the WordPress dashboard, go to Appearance → Themes, click on any theme, and try selecting text using the mouse. Then use (Shift + →) or (Ctrl + Shift + →).You’ll notice that instead of selecting the text, WordPress navigates to the next theme preview. The same issue occurs in the Media Library as well.
- ✅ Test results: Issue resolved with patch. (Shift + →) or (Ctrl + Shift + →) selects the next instead of moving to the next item. and pressing → key only takes you to the next item.
Additional Notes
- Bug Reproduction video . Note: I have pressed (Shift + →) or (Ctrl + Shift + →)
- Patch Test video. Note: I have pressed (Shift + →) or (Ctrl + Shift + →)
This ticket was mentioned in PR #9014 on WordPress/wordpress-develop by @abcd95.
5 months ago #13
This PR prevents theme preview and media library modals from interfering with text selection keyboard shortcuts.
When using Shift+Arrow or Ctrl+Shift+Arrow to select text in modal descriptions, the modal would capture the arrow keys and navigate to next/previous items instead of allowing text selection. This unexpected behavior prevented users from efficiently editing text.
Added tests to verify the logic to ignore arrow key events when Shift or Ctrl+Shift modifiers are pressed, allowing default text selection behavior.
Follows Patch: https://core.trac.wordpress.org/attachment/ticket/63126/63126-theme-and-edit-attachments.patch
@joedolson commented on PR #9014:
4 months ago #15
I briefly considered whether the tests should use event.code or event.key instead of the deprecated event.keyCode, but decided that it makes more sense to keep the tests using the same references used in the actual code, and changing those over should be a separate task.
Patch added