https://bugzilla.wikimedia.org/show_bug.cgi?id=58255

--- Comment #2 from Jack Phoenix <[email protected]> ---
(In reply to comment #1)
> This is very little information to go on....
I think that the original report is pretty clear and concise.

But anyway, here goes the longer version.

As a skin developer, I want to build a cool skin -- something unlike anything
else that's out there. I use MediaWiki's skin-related classes (BaseTemplate et
al.) correctly, because I like to do things right. When I've struggled enough
with MediaWiki's JS stuff (regarding the AJAX page watching, for example --
while a separate issue, /resources/mediawiki.page/mediawiki.page.watch.ajax.js
assumes way too many things specific to core MW), I test my skin, preferrably
in various different browsers, and once I've sorted out all the remaining
issues, I notice that accesskeys don't work.

Were I a newbie dev, at this point I'd be asking, "how the hell is this
possible?! I did everything by the book!". What the book doesn't tell you is
that core (JS) modules make stupid assumptions. Namely, I'm talking about the
updateTooltipAccessKeys function in mediawiki.util
(/resources/mediawiki/mediawiki.util.js). The core list has been hard-coded to
'#column-one a, #mw-head a, #mw-panel a, #p-logo a, input, label', which works
for Monobook, Vector and some (but definitely not all) other skins.

Let's take a live example: the Monaco skin
(http://www.shoutwiki.com/w/index.php?title=Main_Page&useskin=monaco).
Page-specific action links (Monobook's #p-cactions) are in ul#page_controls
(and ul#page_tabs). Try hovering your mouse over the "history" link, for
example. The title is (and will remain as) "Past revisions of this page [h]" --
note the "h" enclosed in brackets; it should be "[alt-h]" or something similar
(I'm using Internet Explorer 11 on Windows 7). The underlying PHP code looks
like what you'd expect:
<a href="<?php echo htmlspecialchars(
$this->data['content_actions']['history']['href'] ); ?>" title="<?php echo
Linker::titleAttrib( 'ca-history', 'withaccess' ) ?>" accesskey="<?php echo
Linker::accesskey( 'ca-history' ) ?>">

I've had to hack the updateTooltipAccessKeys function in mediawiki.util to take
this ID -- and our other custom skins' various IDs and other selectors -- into
account (but that change is not yet live on ShoutWiki), but this seems far from
ideal.

There's, of course, the possibility that I've just been outright stupid here.
If that's the case, then please do advise me. However, as I'm sure everyone
around here is aware, the docs suck -- especially regarding skinning.

AJAX page watching and it's somewhat recent changes are a good example, IMO: in
the past to support that feature, all you needed was a hidden div that had the
ID "mw-js-message". Apparently this div is nowadays obsolete and AJAX page
watching support requires the watch link to have the ID "ca-watch" (or
ca-unwatch) or some other ID from the small list of hard-coded IDs. Then again,
that's hardly that module's *only* issue -- not everyone uses <ul>s and <li>s
like Monobook/Vector do.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to