If someone is enrolled the DT a/b test, we want to know about their
editing here as well.
Bug: T273096
Change-Id: If2bb04011c8ca54e8c7ffd073e21bec45e92460c
In some languages, image options like 'alt' or 'thumb' can have
multiple synonyms. They were only handled for English (and were
hard-coded).
Change-Id: Ib03932d3d85a5540bea325f2717da3365756a90e
We were already using it for almost all interactions with the editing
area, except for this code which restores the selection after closing
a dialog.
Bug: T254612
Change-Id: I26d22d9c5d64fe8c861405e65cd4464c349aeac9
Data tables should always include a caption for accessibility reasons.
So add a placeholder caption when using the "insert table" button.
Bug: T252350
Change-Id: I6773e2274007946de516ae34e841f66ad20ebc0c
Using an event introduces a race condition where the extension
adding the listener has to do so before WikiEditor finishes loading.
Change-Id: I5a8dc6f8fd1b1939b5d98307b20ef1fd355cee99
Remove use of mw.loader.getVersion, which I'm planning to remove
from the public API. The only valid use case I found of it (not
in WMF repos) is to check if a module exists, for which one can
use mw.loader.getState() already.
The code path here handles with the 'icon' property of a
WikiEditor "toolbar group tool". In other words, the buttons
you can click in the toolbar to open a dialog or insert markup.
I found two ways to reach this code path:
* For the built-in tools and icons that are part of WikiEditor.
These are all based on OOUI now and no longer use inline styles
with background-image etc., they are class-based instead, with
the URLs and language variants handled server-side by RL.
* For user scripts that register a custom tool and icon.
To try this, copy snippets to the console on an edit page from
<https://meta.wikimedia.org/wiki/User:Krinkle/Scripts/InsertWikiEditorButton>
These pass urls as the 'icon' property and thus don't satisfy
the hasOwn condition in this code. And even if they did, there'd
be no reason for the module version to be helpful to the thumbnail
url the user would have passed.
This line of code has existed with the mw.loader.getVersion() call
since the repository's very first commit in 2010 (9d278e8dee).
The worst that can happen is if there are stil some internal icons
hitting this path, they'll be cached for 1 hour instead of 7 days
(per /w/static.php rules in production). For third parties, there
would be no difference and such static paths have no caching by
default either way (outside WMF).
Change-Id: I6ec29abde0085d04b662b56b5ebcc2bd7fa267f8
This commit localizes numbers before passing to mw.msg. This occurs
in two places, the successful replacement count and the error message
where too many cells are used in the table tool. The comment above the
second call was not correct, as the existing message used a substitution.
Bug: T244812
Change-Id: I00f83bd478bc42cb536edceba2bcc9daf0b13b3d
* Allows us to briefly animate the transition between
expanded and collapsed
* Remove the left/right-arrows, and just use a single
down-arrow with rotations.
* Remove the up-arrow used by the dropdown, we don't
use that elsewhere in WMUI.
* Remove PNG fallback as `transform` works only with IE 9+
and we're not supporting WikiEditor on Grade C browsers.
Change-Id: I29ab0c35b890689bdea8de5f6bbeef0948483fa5
Fixing aria-* attributes to the Heading menu and roles property to
the menu dropdown items in order to make the element function like an
ideal menu to screen readers.
Adding aria-expanded attribute to Expandable panes(Advanced,
Special Characters and Help) widgets to allow
screen readers announces of the state expandable buttons.
Bug: T244426
Change-Id: I0cb47afd7f3622ed83a57410086984d9abc9acfd
This reduces the initial loaded modules.
Also add the dependency on module 'oojs-ui-widgets' because
jquery.wikiEditor.toolbar.js uses OO.ui.ToggleButtonWidget.
Change-Id: I03d0f73fb77bb389dd4e5ad2aa15b3ff5a97e5f5
e75284e528 escapes a few messages too
eagerly but 1fc00749fb only fixes one
of such mistakes.
Without this change, the labels of some toolbar buttons (e.g. Italian
'Redirect', Welsh 'Numbered list') display ''' where apostrophes
should be.
Change-Id: I3265631512c5d22ecc3dafb9d56acecc7d50ad1d
Also separate out Apex-specific styling into a separate file.
The current toolbar is already supposed to be aligned with Apex
so the visual changes here are minimal.
Bug: T223155
Change-Id: I7a0a21809018e0094d50992054523d20be3c5473
An <a href="#"> element
* shows a status line with a URL on hover and
* opens a new tab on middle click.
For still supporting keyboard navigation the replacement uses
* tabindex="0" to have the normal tab order and
* .on( 'keydown' ) to catch the Enter key.
The image example in the help does not need a link or a keyboard
navigation.
Change-Id: I6d75f75871bb29bdd878451f282f2055ed3f4f5c
This was used for setting incremental tabindex attributes
on the <button> elements of the "Find and replace" dialog
as opened from the "Advanced" toolbar section. I was unable to
find a difference in behaviour with and without this code running.
Both with and without this, when tabbing from the first input
field in the dialog, the buttons are in the tab order after
the input fields (matching the visual rendering). Unclear
what this was doing.
This re-applies commit 81b08daa48, which was reverted (5f356b1a),
because I forgot to remove the calls in dialogs.config.js.
Bug: T234581
Bug: T235701
Change-Id: Ic51074c3d2b2e9b9b050c9f42862519a3e78af16