Page MenuHomePhabricator

[Bug] Page's watched watchstar focus is rotated
Closed, ResolvedPublic

Description

Steps to Reproduce

  1. Visit https://en.m.wikipedia.org/wiki/Dog
  2. Right click the watchstar and select inspect
  3. Right click the parent li element and force the state to :focus
    Screenshot from 2018-04-16 14-58-27.png (909×960 px, 183 KB)
  4. Tap the watch star
    Screenshot from 2018-04-16 14-58-37.png (909×960 px, 181 KB)

Expected Results

  • Watchstar icon spins but button remains unchanged

Actual Results

  • Watchstar button spins

Environments Observed

  • enwiki

Browser Version

  • Chromium v65.0.3325.181 (Nexus 6P simulator)

OS Version

  • Ubuntu v17.10 64b

Device Model

  • Desktop

Device Language

  • English

Event Timeline

ovasileva triaged this task as Medium priority.Apr 17 2018, 9:05 AM
ovasileva subscribed.

@Niedzielski - does it also actually add to the watchlist or is it just the icon?

@ovasileva this is only a visual issue. The functionality works fine; pages can be added or removed from the watchlist.

I don't understand why this is a bug.
We rotate the watchstar 72deg when watched via css transform, hence that's why the focus state gets rotated and the visual effect is correct.

We could of course rotate the glyph so only the pseudo element gets rotated but I don't understand the significance of the focus state. This is not an accessibility problem as far as I'm aware...

Can you enlighten me? cc @alexhollender

It physically changes the focus hit area and it looks terrible when tabbing the focus with the keyboard (which admittedly is already broken).

bar.gif (227×921 px, 82 KB)

foo.gif (563×329 px, 739 KB)

Jdlrobson added a subscriber: Volker_E.

I don't know enough about screen readers to know if that's a problem or not, but I see several options here:

  1. Move rotation onto the pseudo before element like we do for mf-mw-ui-icon-rotate-anti-clockwise
  2. Adapt icon so that it can be rotated a denomination of 90 degrees. A 90 degree rotated icon will still appear like a box unlike a 72 degree one.

Ping @Volker_E @alexhollender

Side note: The page actions do not seem to be tab-able to me at all (related: T142527)

I need to double check this with Nirzar, but perhaps another option would just be to remove the rotation animation? I'm also noticing a small jump at the end of the rotation (from empty to green), almost like the icon sits down 1px right at the end of the animation.

  1. Move rotation onto the pseudo before element like we do for mf-mw-ui-icon-rotate-anti-clockwise

That sounds like a good solution to me. Keep the animation and fix the funky :focus state.

Jdlrobson claimed this task.

This has been fixed.