mediawiki-extensions-Echo/includes
Nicholas Ray 7880cc1895 Make talk page notification use link-class, id and don't set class
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] 67bf58a489/modules/ext.echo.init.js (L172)

Bug: T274428
Change-Id: I5afc74992ad3153ac32df65ccf5fd03b469f05fb
2021-05-27 19:22:10 -06:00
..
api phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00
cache Fix PSR12.Properties.ConstantVisibility.NotFound 2020-09-19 21:26:38 +00:00
controller phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00
exception
formatters phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00
gateway Replace uses of DB_MASTER with DB_PRIMARY 2021-05-13 02:04:54 +02:00
iterator phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00
jobs Implement delayed echo notifications 2020-10-28 12:11:15 +01:00
mapper Replace uses of DB_MASTER with DB_PRIMARY 2021-05-13 02:04:54 +02:00
model Merge "Replace RecentChange::getPerformer with RecentChange::getPerformerIdentity" 2021-05-24 15:27:56 +00:00
ooui build: Updating mediawiki/mediawiki-codesniffer to 29.0.0 2020-01-14 05:09:44 +00:00
Push Make AttributeManager a service 2021-02-26 12:58:23 -08:00
special phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00
AttributeManager.php Remove deprecated User method getGroups 2021-02-26 21:47:58 -08:00
Bundleable.php Add strict "array" type hints to code expecting arrays 2019-10-24 15:18:58 +00:00
Bundler.php phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00
DataOutputFormatter.php phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00
DeferredMarkAsDeletedUpdate.php Replace uses of DB_MASTER with DB_PRIMARY 2021-05-13 02:04:54 +02:00
DiscussionParser.php Replace uses of DB_MASTER with DB_PRIMARY 2021-05-13 02:04:54 +02:00
EchoArrayList.php
EchoCachedList.php Drop private EchoCachedList::ONE_DAY, unused 2020-09-20 13:38:01 +01:00
EchoContainmentList.php Make "@… array" type hints more specific 2018-08-13 09:27:37 +02:00
EchoContainmentSet.php Add page linked event title muted list 2020-05-06 12:38:55 +02:00
EchoDbFactory.php Replace uses of DB_MASTER with DB_PRIMARY 2021-05-13 02:04:54 +02:00
EchoDiffGroup.php Make "@… array" type hints more specific 2018-08-13 09:27:37 +02:00
EchoDiffParser.php build: Updating mediawiki/mediawiki-codesniffer to 32.0.0 2020-10-29 14:24:24 +00:00
EchoHooks.php Make talk page notification use link-class, id and don't set class 2021-05-27 19:22:10 -06:00
EchoOnWikiList.php build: Updating mediawiki/mediawiki-phan-config to 0.9.0 2019-12-29 11:59:32 +00:00
EchoServices.php Make AttributeManager a service 2021-02-26 12:58:23 -08:00
EchoSummaryParser.php phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00
EmailBatch.php build: Updating composer dependencies 2021-05-04 09:05:15 -07:00
EmailFormat.php Fix PSR12.Properties.ConstantVisibility.NotFound 2020-09-19 21:26:38 +00:00
EmailFrequency.php Fix PSR12.Properties.ConstantVisibility.NotFound 2020-09-19 21:26:38 +00:00
EventLogging.php Echo: Remove redundant cast 2021-02-03 07:39:38 +01:00
ForeignNotifications.php phpcs: Break long lines 2020-06-27 12:05:03 +02:00
ForeignWikiRequest.php ForeignWikiRequest: Guard against bad response 2021-02-17 10:11:10 +01:00
Notifier.php Avoid using User::isBlocked 2021-03-03 21:39:10 +02:00
NotifUser.php Replace uses of DB_MASTER with DB_PRIMARY 2021-05-13 02:04:54 +02:00
ResourceLoaderEchoImageModule.php Remove non helpful (auto-generated) comments 2019-10-23 12:31:35 +02:00
schemaUpdate.php Enable MediaWiki.Usage.ForbiddenFunctions.isset and make pass 2020-02-09 11:58:49 +01:00
SeenTime.php phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00
UnreadWikis.php build: Updating composer dependencies 2021-05-04 09:05:15 -07:00
UserLocator.php phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure 2021-05-04 09:06:42 -07:00