Make WordPress Core

Opened 6 weeks ago

Last modified 7 hours ago

#64380 reopened defect (bug)

Widgets sidebar and position can't be changed with accessibility mode enabled

Reported by: vybiral's profile vybiral Owned by: joedolson's profile joedolson
Milestone: 6.9.1 Priority: normal
Severity: normal Version: 6.9
Component: Widgets Keywords: dev-feedback fixed-major
Focuses: accessibility Cc:

Description

Hello,
in WordPress 6.9 with Block-based widgets editor disabled, sidebar and position of widgets can't be changed in Accessibility Mode.

Steps to reproduce

1) Install clean WordPress 6.9.
2) Install theme with support of multiple widgets areas (e.g. Twenty Seventeen).
3) Disable Block-based widgets editor by installing Classic Widgets plugin or just using built-in filter.

add_filter( 'use_widgets_block_editor', '__return_false' );

4) Go to Appearance – Widgets and click "Enable accessibility mode" at top-right corner.
5) Try to insert any widget (e.g. Custom HTML) with any content into "Footer 1" sidebar. The widget will always be placed at the very last sidebar (which is "Footer 2" in Twenty Seventeen theme, but this behaviour is theme-independent).

Why this should be considered as bug

I know it could be questionable if this is a bug in WordPress core and not just compatibility issue, because to reproduce it, you have to install non-default theme with widgets support and manually turn off Block-based widgets editor. But I believe this should be considered so, because Classic widgets editor including its accessibility mode is still core WordPress feature, which is not just turned on by default.

Thank you.

Change History (12)

#1 @sabernhardt
6 weeks ago

  • Focuses accessibility added

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


6 weeks ago

#3 @joedolson
6 weeks ago

  • Milestone changed from Awaiting Review to 7.0
  • Owner set to joedolson
  • Status changed from new to accepted

#4 @sabernhardt
6 weeks ago

  • Milestone changed from 7.0 to 6.9.1

This seems to be a new bug. I was able to reproduce it in 6.9 but not in 6.8.3.

#52399 is for possibly removing the accessibility mode, if the other classic mode is good enough, but it has not been removed yet.

This ticket was mentioned in PR #10633 on WordPress/wordpress-develop by @wildworks.


5 weeks ago
#5

  • Keywords has-patch added

#6 @wildworks
5 weeks ago

  • Keywords has-patch removed

This issue is caused by a variable name ($sidebar_id) collision caused by [61187].

The sidebar selected by the user is overwritten each time this loop runs, resulting in widgets being unintentionally added to the last sidebar.

I've submitted PR 10633, but if you have any ideas for better variable names, please let me know.

@wildworks commented on PR #10633:


4 weeks ago
#7

Thanks both of you for the reviews! I'll commit this PR.

#8 @wildworks
4 weeks ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 61399:

Widgets: Insert widgets into the selected sidebar correctly in accessibility mode.

Renames variables to resolve conflict with outer scope variables, fixing widget placement in selected sidebars.

Props joedolson, sabernhardt, vybiral, wildworks.
Fixes #64380.

#9 @wildworks
4 weeks ago

  • Keywords dev-feedback added

Reopening #64380 to request backporting [61399] to 6.9 branch

#10 @wildworks
4 weeks ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#11 @sabernhardt
4 weeks ago

  • Keywords fixed-major added

This ticket was mentioned in Slack in #core by jorbin. View the logs.


7 hours ago

Note: See TracTickets for help on using tickets.