[wp-trac] [WordPress Trac] #63011: Customizer: The back button is not keyboard focusable
WordPress Trac
noreply at wordpress.org
Mon Apr 7 09:24:38 UTC 2025
#63011: Customizer: The back button is not keyboard focusable
--------------------------+----------------------------
Reporter: wildworks | Owner: joedolson
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.9
Component: Customize | Version: 3.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses: accessibility
--------------------------+----------------------------
Comment (by wildworks):
@abcd95 Sorry, my feedback was not correct.
I tried to find out which changeset this problem occurred in. As a result,
I identified that r59224 caused this problem.
It is probably correct that the back button has a initial setting of
`tabindex="-1"`. This button should be dynamically applied `tabindex="0"`
via JS code and should be expected to be focusable. However, r59224 seems
to have removed the logic.
For example, I found that the following changes could solve this issue by
restoring some code. However, simply restoring a single line may not be
enough:
{{{
diff --git a/src/js/_enqueues/wp/customize/controls.js
b/src/js/_enqueues/wp/customize/controls.js
index 7a6e69cf3e..14d3e63d0c 100644
--- a/src/js/_enqueues/wp/customize/controls.js
+++ b/src/js/_enqueues/wp/customize/controls.js
@@ -1615,6 +1615,7 @@
} else {
expand = function() {
section._animateChangeExpanded( function() {
+ backBtn.attr(
'tabindex', '0' );
backBtn.trigger(
'focus' );
content.css(
'top', '' );
container.scrollTop( 0 );
}}}
@joedolson Could you confirm whether the code removed in r59224 was
intentional?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63011#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list