Page MenuHomePhabricator

Fix focus handling of pinnable elements
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Background

  • When pinning and unpinning an element, the focus should automatically be placed on either the dropdown menu (in the case of clicking unpinning) or the "hide" button (in the case of clicking pinning). Right now it is not handling focus properly.

To reproduce:

  • pin the Tools menu
  • click the "hide" button
  • go to console and log out document.activeElement
  • see it is undefined

It should be set to the input element for the tools dropdown

Acceptance criteria

  • Clicking the "move to sidebar" button places focus on the "hide" button
  • Clicking the "hide" button places focus on the input element in the dropdown

Event Timeline

Change #1245421 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Fix focus handling when hiding pinnable elements

https://gerrit.wikimedia.org/r/1245421

Change #1245421 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix focus handling when hiding pinnable elements

https://gerrit.wikimedia.org/r/1245421

Etonkovidova subscribed.

Checked in enwiki beta

From Acceptance criteria in the task descirption:
✅ - Clicking the "move to sidebar" button places focus on the "hide" button

The visible focus will be on`hide` and Console Live Expression(document.activeElement) will show
button.vector-pinnable-header-toggle-button.vector-pinnable-header-unpin-button

✅ - Clicking the "hide" button places focus on the input element in the dropdown
The visible focus will be on Tools dropdown menu and Console Live Expression(document.activeElement) will show
input#vector-page-tools-dropdown-checkbox.vector-dropdown-checkbox

HFan-WMF claimed this task.