Page MenuHomePhabricator

MediaWiki should allow setting tabindex="0" on elements in wikitext
Closed, ResolvedPublic

Description

tabindex="0" tells browser that an element is focusable. Sometimes that's helpful for accessibility reasons.

At a glance, i see no reason not to allow it, as long as we only allow the value 0 [For reference, positive integers are order of element, we probably don't want users messing with that. -1 means don't allow focusing, which i guess we probably don't want users to do either].

Further read:
https://webaim.org/techniques/keyboard/tabindex#zero

Event Timeline

Bawolff created this task.Mar 17 2020, 11:17 PM
Restricted Application removed a project: Patch-For-Review. · View Herald TranscriptMar 17 2020, 11:17 PM

Change 580554 had a related patch set uploaded (by Brian Wolff; owner: Brian Wolff):
[mediawiki/core@master] Allow users to set tabindex="0" on elements

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

Volker_E updated the task description. (Show Details)Mar 18 2020, 12:55 AM

@Volker_E Does only allowing tabindex=0 (but not -1 or positive numbers) in wikitext make sense do you think? Or do you think we should also allow -1?

Volker_E added a comment.EditedMar 18 2020, 1:13 AM

@Bawolff Your intention on the patch is right IMO. There's too much risk of misusing tabindex=-1 currently. Let's stick only with tabindex=0 if there are not other concerns raised.

Krinkle added a subscriber: Krinkle.

This presumably needs a Parsoid patch as well, please leave the task open until that is done and/or decided upon.

Change 580554 merged by jenkins-bot:
[mediawiki/core@master] Allow users to set tabindex="0" on elements

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

This presumably needs a Parsoid patch as well, please leave the task open until that is done and/or decided upon.

Cc @Legoktm.

Change 581605 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] WIP: allow tabindex=0

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

Change 581605 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Allow users to set tabindex=0 on elements

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

ssastry closed this task as Resolved.Mar 19 2020, 6:11 PM
ssastry added subscribers: cscott, ssastry.

@cscott adding this fix to Parsoid as well. T247804: Move Sanitizer from core into Parsoid will ensure we don't need to do dual duty in the sanitizer in the future and will be another step in the integration.

Thanks @cscott for the quick fix!

Change 582877 had a related patch set uploaded (by C. Scott Ananian; owner: Arlolra):
[mediawiki/vendor@master] Bump to wikimedia/parsoid@0.12.0-a7

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

Change 582877 merged by jenkins-bot:
[mediawiki/vendor@master] Bump to wikimedia/parsoid@0.12.0-a7

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