Page MenuHomePhabricator

Ensure basic accessibility for subreferencing feature
Closed, ResolvedPublic

Description

With the upcoming rollout of the subreferencing feature, basic accessibility should be in place.

  • References should be reachable via tab navigation
  • Popups should open when triggered via keyboard

Findings (for review): internal doc on a11y

Event Timeline

Change #1186936 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[VisualEditor/VisualEditor@master] Connect LinearContextItem label to edit button

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

Change #1186944 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[oojs/ui@master] Allow Enter key when there is only one SearchWidget result

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

Change #1187377 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Re-define tab key in the reference reuse search dialog

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

I left a few suggestions in the document. Technical version:

  • We added a 2nd button to our ContextItem. But VE expects only 1 button. The 1st edit button can be activated with Enter. The code for this can be seen in ve.ce.LinearEnterKeyDownHandler.static.execute. Enter simply executes the reference command that is attached to ve.ce.MWReferenceNode. That command is a very trivial windowopen command that opens the reference dialog a.k.a. ve.ui.MWReferenceDialog.
    • We would need an additional …KeyDownHandler in case we want the tab key to do something. It's unclear if this would conflict with existing code in VE.
    • We could make the command more complex and make it do different things, depending on the ContextItem and if it contains more than one button. But it's unclear if a command is able to interact with a ContextItem.
    • Similar, we make the command more complex so that Enter doesn't open the edit dialog directly but a tiny floating dropdown with only 2 items for the 2 buttons. Similar to the Ctrl+Shift+P dropdown in VE. Only keyboard users will see this.
    • Turns out the intended behavior is to use Ctrl+Shift+Enter to focus the ContextItem. Then tab can be used to go to the 2nd button.
  • Tabbing in the ref dialog Citoid popup makes it loose the focus completely, with no way back. This appears to be an upstream bug, as far as I can see. This is intended behavior because it's a ContextItem. While we can try to improve it, it's not a bug.

See the patches in this ticket for a few more minor suggestions.

Change #1187377 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Re-define tab key in the reference reuse search dialog

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

Investigation is done. The basic requirements are all fine. The open patches are optional convenience features, not strictly needed to call this done.

Change #1189146 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[VisualEditor/VisualEditor@master] [POC] Easier to use focus trap in ContextItem popups

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

Change #1186936 abandoned by Thiemo Kreuz (WMDE):

[VisualEditor/VisualEditor@master] [POC] Connect LinearContextItem label to edit button

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

Change #1189593 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[VisualEditor/VisualEditor@master] Fix keyboard focus wraparound in custom window managers

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

Change #1190186 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Revert "Re-define tab key in the reference reuse search dialog"

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

Change #1189146 abandoned by Thiemo Kreuz (WMDE):

[VisualEditor/VisualEditor@master] [POC] Easier to use focus trap in ContextItem popups

Reason:

Obsolete thanks to I7c75f7f.

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

Change #1189593 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Fix keyboard focus wraparound in custom window managers

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

Change #1193184 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (8b1b8b872)

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

Change #1193184 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (8b1b8b872)

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

Change #1190186 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Revert "Re-define tab key in the reference reuse search dialog"

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

Change #1212598 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[oojs/ui@master] Add missing preventDefault to SearchWidget.onQueryKeydown

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

Change #1212602 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Highlight ref search result when there is only one

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

Change #1212598 merged by jenkins-bot:

[oojs/ui@master] Add missing preventDefault to SearchWidget.onQueryKeydown

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

Change #1219646 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update OOUI to v0.53.1

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

Change #1219646 merged by jenkins-bot:

[mediawiki/core@master] Update OOUI to v0.53.1

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