mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
7880cc1895
Before this commit, setting:
```
$wgVectorConsolidateUserLinks = [
'logged_in' => true
];
```
would result in an orange talk notification that had missing or
incorrect attributes (`#ca-mytalk` instead of `#pt-mytalk` and missing
the `title` and `accesskey` attributes) when visiting modern Vector
with a talk notification visible. The notification's html looked like:
```
<li id="ca-mytalk" class="mw-echo-alert">
<a href="/wiki/User_talk:Newuser5">You have a new Talk page message</a>
</li>
```
The `pt-mytalk` id is important for echo to remove the notification [1].
The title and accesskey are important for accessibility reasons.
This commit corrects that by setting a `link-class`, setting an explicit
`id`, and NOT setting a `class` key. This results in html that is
correct in both modern and legacy Vector:
```
<li id="pt-mytalk">
<a href="/wiki/User_talk:Newuser5" class="mw-echo-alert" title="Your talk page [ctrl-option-n]" accesskey="n">You have a new Talk page message</a>
</li>
```
[1]
|
||
---|---|---|
.. | ||
api | ||
cache | ||
controller | ||
exception | ||
formatters | ||
gateway | ||
iterator | ||
jobs | ||
mapper | ||
model | ||
ooui | ||
Push | ||
special | ||
AttributeManager.php | ||
Bundleable.php | ||
Bundler.php | ||
DataOutputFormatter.php | ||
DeferredMarkAsDeletedUpdate.php | ||
DiscussionParser.php | ||
EchoArrayList.php | ||
EchoCachedList.php | ||
EchoContainmentList.php | ||
EchoContainmentSet.php | ||
EchoDbFactory.php | ||
EchoDiffGroup.php | ||
EchoDiffParser.php | ||
EchoHooks.php | ||
EchoOnWikiList.php | ||
EchoServices.php | ||
EchoSummaryParser.php | ||
EmailBatch.php | ||
EmailFormat.php | ||
EmailFrequency.php | ||
EventLogging.php | ||
ForeignNotifications.php | ||
ForeignWikiRequest.php | ||
Notifier.php | ||
NotifUser.php | ||
ResourceLoaderEchoImageModule.php | ||
schemaUpdate.php | ||
SeenTime.php | ||
UnreadWikis.php | ||
UserLocator.php |