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

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 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?

@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 subscribed.

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 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.

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