close

Make WordPress Core

Opened 4 months ago

Closed 2 months ago

#64380 closed defect (bug) (fixed)

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: fixed-major dev-reviewed commit
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 (14)

#1 Image @sabernhardt
4 months ago

  • Focuses accessibility added

Image

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


4 months ago

#3 Image @joedolson
4 months ago

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

#4 Image @sabernhardt
4 months 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.

Image

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


4 months ago
#5

  • Keywords has-patch added

#6 Image @wildworks
4 months 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.

Image

@wildworks commented on PR #10633:


3 months ago
#7

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

#8 Image @wildworks
3 months 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 Image @wildworks
3 months ago

  • Keywords dev-feedback added

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

#10 Image @wildworks
3 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#11 Image @sabernhardt
3 months ago

  • Keywords fixed-major added

Image

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


2 months ago

#13 Image @joedolson
2 months ago

  • Keywords dev-reviewed commit added; dev-feedback removed

#14 Image @joedolson
2 months ago

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

In 61510:

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.

Reviewed by joedolson.
Merges [61399] to the 6.9 branch.

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

Note: See TracTickets for help on using tickets.