This is a proposed improvement for screen reader users (vision impairment) primarily.
The Echo icons' text is not informative: only says "Alert (0)" / "Alert (1)" / "Alerts (2)" / etc. or "Notifications ($1)", etc.
Not an issue for a regular, but for newcomer it's unclear how this element behaves.
I think the following messages would be more helpful due to being more descriptive: [[ https://github.com/DemianX0/mediawiki-extensions-Echo/commit/e2ac07e6a8451a0dfc2880a04001351113941a96#diff-1a490f08504158838befaa816ee8d5c08dff9e694d5a568ce4b0a4398dcc563eR237-R238 | PATCH ]]
* `"tooltip-pt-notifications-alert": "Alerts. $1 unread. Opens popup listing {{GENDER:$1|your}} alerts."````
* `"tooltip-pt-notifications-notice": Notices. $1 unreadalert": "Alerts. Opens popup listing {{GENDER:$1|your}} notices."`alerts.",
The `echo-notification-alert` and `-notice` messages are merged into `tooltip-pt-notifications-alert` and `-notice`"tooltip-pt-notifications-notice": "Notices. Opens popup listing {{GENDER:|your}} notices.",
"echo-notification-alert": "Alerts. $1 unread. Opens popup listing {{GENDER:$1|your}} alerts."`,
"echo-notification-notice": Notices. $1 unread. Opens popup listing {{GENDER:$1|your}} notices."`,
```
`tooltip-pt-notifications-*` messages are used server-side (for initial HTML), where the notification count is not available, thus the message does not include a count. The client-side JS updates the message with the count.
If needed the count could be included server-side, however I haven't investigated the costs. This would benefit non-JS users (only).
As an added benefit I propose moving the message from the text node - which involves a tricky and problematic solution to hide it, that the web team is [[ https://phabricator.wikimedia.org/T264339#6588587 | struggling with ]] - into the tooltip (`title` attribute). This solves the hiding issue and also benefit non-screen-reader-users.
[[https://github.com/DemianX0/mediawiki-extensions-Echo/commit/e2ac07e6a8451a0dfc2880a04001351113941a96#diff-629535f46e04681786670409e97aed8023610755d5e4d175c3d356dcb210fba5R72|PATCH ]] - non-final, using the `tooltip-pt-notifications-alert` message is preferable.
Steps to test this UX:
# Run JAWS / NVDA / VoiceOver screen reader
# Open demo: http://demian-demo.epizy.com/wiki/Desktop_Improvements_volunteer_demo
# Close sidebar
# Click in the header
# Press TAB until one of the Echo icons is focused
# Listen to the reader
# Press TAB / SHIFT-TAB to focus the other icon
# Listen to the reader