Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#44946 closed defect (bug) (fixed)

"post locked" info animation doesn't work as expected

Reported by: afercia's profile afercia Owned by: afercia's profile afercia
Milestone: 5.3 Priority: normal
Severity: normal Version: 3.6
Component: Administration Keywords: has-screenshots has-patch
Focuses: ui, accessibility Cc:

Description (last modified by afercia)

Follow up to #24553

The CSS animation added in #24553 doesn't work as expected for a couple reasons:

  • height "auto" can't be animated with CSS
  • jQuery delay() works only for the jQuery effects queue, not for other methods like empty()

The original intent of this animation was to make the "user is currently editing" info smoothly slide in and out, avoiding "jumps" in the UI that could be disturbing for users.

I'd say either the leftover code related to the animation should be removed or the animation should be fixed.

Created at WordCamp Roma 2018 contributors day.

/Cc @johnbillion

Attachments (4)

44946.diff (1.4 KB) - added by afercia 5 years ago.
locked-info Screen Shot 2018-08-25 at 16.49.54.png (77.5 KB) - added by afercia 4 years ago.
Locked info not hidden from assistive technologies
44946.2.diff (2.0 KB) - added by afercia 4 years ago.
post locked.gif (139.7 KB) - added by afercia 4 years ago.
Animated GIF with 44946.2.diff​ applied

Download all attachments as: .zip

Change History (12)

#1 @afercia
5 years ago

  • Description modified (diff)

#2 @afercia
5 years ago

Relevant changesets:

For reference, the "locked info" was moved to the first line in #38185

Last edited 5 years ago by SergeyBiryukov (previous) (diff)

5 years ago

#3 @afercia
5 years ago

44946.diff is a POC to fix the animation with 2 drawbacks:

  • magic number for min-height
  • setTimeout()

#4 @afercia
4 years ago

  • Milestone changed from Awaiting Review to 5.3
  • Owner set to afercia
  • Status changed from new to assigned

Looking back at this ticket, I'd lean towards just removing the dead code originally meant for the animation. In 6 years no one complained for the missing animation, so looks like some clean-up is preferable.

#5 @afercia
4 years ago

  • Focuses accessibility added

Also: the content of .locked-indicator is hidden only visually. Its text is announced by screen readers even when a post is not locked, which is definitely misleading (see attached screenshot).

I'd consider this a bug, as incorrect information is communicated to assistive technology users. I'd like to propose to:

  • really hide both .locked-indicator and .locked-info using display: none: this will effectively hide their content also from assistive technologies
  • when a post is locked, reveal these elements without animation

#6 @johnbillion
4 years ago

  • Keywords needs-patch added

4 years ago

Locked info not hidden from assistive technologies

4 years ago

#7 @afercia
4 years ago

  • Keywords has-patch added; needs-patch removed

44946.2.diff :

  • really hides the locked information both visually and from assistive technologies
  • removes dead code originally meant for the CSS animation

4 years ago

Animated GIF with 44946.2.diff​ applied

#8 @afercia
4 years ago

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

In 45417:

Accessibility: Improve toggling the "Post locked" information visibility.

  • effectively hides the "Post locked" information from assistive technologies
  • when a post is locked, reveals the "Post locked" information without CSS animation
  • the height CSS animation didn't work anyways after [24906]

See #24553.
Fixes #44946.

Note: See TracTickets for help on using tickets.