WordPress.org

Make WordPress Core

Opened 15 months ago

Closed 7 months ago

#49354 closed defect (bug) (fixed)

Provide 'Cancel' when editing widget in accessibility mode

Reported by: garrett-eclipse Owned by: audrasjb
Milestone: 5.6 Priority: normal
Severity: normal Version:
Component: Widgets Keywords: has-patch has-screenshots commit
Focuses: ui, accessibility, administration Cc:

Description (last modified by garrett-eclipse)

Hello,

While playing with the Widgets Accessibility Mode I found there's no easy way to cancel/goback when editing a widget;
https://core.trac.wordpress.org/raw-attachment/ticket/49354/Screen%20Shot%202020-02-03%20at%2012.46.44%20PM.png

On the other hand when adding a widget we do have a cancel option;
https://core.trac.wordpress.org/raw-attachment/ticket/49354/Screen%20Shot%202020-02-03%20at%2012.46.25%20PM.png

It would be nice to provide a cancel button on the edit view to allow you to go back without saving any changes to your widget. Right now to go back/cancel you have to go to the menu and select Widgets again.

Attachments (8)

Screen Shot 2020-02-03 at 12.46.44 PM.png (35.0 KB) - added by garrett-eclipse 15 months ago.
Edit Widget only provides 'Delete' and 'Save'
Screen Shot 2020-02-03 at 12.46.25 PM.png (35.6 KB) - added by garrett-eclipse 15 months ago.
Add widget does provide 'Cancel'
49354.diff (2.0 KB) - added by garrett-eclipse 14 months ago.
Initial patch to introduce cancel to the editing widget screen within accessibility mode
Screen Shot 2020-03-06 at 2.43.19 PM.png (27.7 KB) - added by garrett-eclipse 14 months ago.
Updated Edit Screen w/ new Cancel link
Screen Shot 2020-03-06 at 2.43.10 PM.png (31.4 KB) - added by garrett-eclipse 14 months ago.
Updated Add Screen switching cancel button to link
Screen Shot 2020-03-06 at 2.43.37 PM.png (7.5 KB) - added by garrett-eclipse 14 months ago.
Non-accessibility mode edit widget showing button links which I followed to conform to convention
49354.1.diff (2.1 KB) - added by audrasjb 7 months ago.
Widgets: Accessibility: Introduce cancel button in Widgets screen accessibility mode’s widget editor
61ac8ad0ba747498a9f63bed73c857b2.gif (259.6 KB) - added by audrasjb 7 months ago.
Testing 49354.1.diff

Download all attachments as: .zip

Change History (20)

@garrett-eclipse
15 months ago

Edit Widget only provides 'Delete' and 'Save'

@garrett-eclipse
15 months ago

Add widget does provide 'Cancel'

#1 @garrett-eclipse
15 months ago

  • Description modified (diff)

Do note, the cancel button on the Add Widget screen looks identical aside from text to the delete button on the Edit Widget screen.
Might be a good idea to have Delete marked in red to indicate it removes the widget losing all settings, then the cancel can be added in the style we find on Add Widget screen.

#2 @garrett-eclipse
15 months ago

  • Description modified (diff)

#3 @audrasjb
15 months ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

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


14 months ago

#5 @afercia
14 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

This ticket was discussed during today's accessibility bug-scrub: sounds sensible. Moving to Future release. As it's a small, self-contained, fix this can likely go into 5.5 is a patch comes to life.

@garrett-eclipse
14 months ago

Initial patch to introduce cancel to the editing widget screen within accessibility mode

@garrett-eclipse
14 months ago

Updated Edit Screen w/ new Cancel link

@garrett-eclipse
14 months ago

Updated Add Screen switching cancel button to link

@garrett-eclipse
14 months ago

Non-accessibility mode edit widget showing button links which I followed to conform to convention

#6 @garrett-eclipse
14 months ago

  • Keywords has-patch has-screenshots needs-testing added; needs-patch removed

Thanks @afercia I've created an initial patch in 49354.diff if you and @audrasjb can test/review maybe we can milestone for 5.5.

Notes on the patch;

  • I followed the convention of the non-accessible widget edit screen and used the button-link approach.
  • I kept the term Cancel instead of using Done. Done is what the term is on the non-accessible widget, personally I feel Cancel there makes more sense...
  • I copied the widget-control-close-wrapper and widget-control-close classes but wonder if we should if widget-control-cancel is more appropriate
  • I didn't change the Cancel button found when adding a widget in the non-accessible view to a link, it's left as a button.

Thoughts?

@audrasjb
7 months ago

Widgets: Accessibility: Introduce cancel button in Widgets screen accessibility mode’s widget editor

@audrasjb
7 months ago

Testing 49354.1.diff

#7 @audrasjb
7 months ago

  • Keywords needs-testing removed
  • Milestone changed from Future Release to 5.6
  • Status changed from reviewing to accepted

Thanks for the patch, @garrett-eclipse

I refreshed it. Looks like a great enhancement!
Patch works fine. Let's add this enhancement in 5.6 milestone.

#8 @afercia
7 months ago

Worth reminding that in WordPress 5.6 the old Widgets screen will be replaced with the new block-based one. When activating the Gutenberg plugin, the old page gets already entirely replaced. I heard there should be a way to disable the new screen. Maybe via a filter? Not sure.

#9 @garrett-eclipse
7 months ago

  • Keywords commit added

Thanks @afercia appreciate the heads up, if this ticket wasn't ready for commit I'd probably drop it.

As it's good to go I'd say let's commit it and if it's ripped out with the rest of Widgets so be it. But if it sticks around a version or two due to WP providing extended support to the old Widgets screen, like was done with the Classic Editor, then awesome.
Either way happy to have this complete ticket close as fixed rather than be a wontfix.

#10 @afercia
7 months ago

Sure :)

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


7 months ago

#12 @SergeyBiryukov
7 months ago

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

In 49113:

Accessibility: Widgets: Add a "Cancel" link when editing a widget in accessibility mode.

This allows the user to go back without saving any changes to the widget.

Props garrett-eclipse, audrasjb, afercia.
Fixes #49354.

Note: See TracTickets for help on using tickets.