I find it very odd in T259858 that MediaWiki by default will allow site admin to create undismissable site-wide notice for site users. So I tested it and it's true. Probably no site admin want to do that, except as a part of campaign to drive off users from the site. This really hurts the mission of optimum default MediaWiki experience.
A trivial dismiss button seems to be provided by #DismissableSiteNotice. But a site admin has to know about that extension and also do the installation chores just to provide what should really be there already (since the notice is baked in core).
I propose that #DismissableSiteNotice should be folded to core. Alternatively, the sitenotice mechanism should be moved from core to this extension if that would be better.
The extension is already installed on all Wikimedia wikis, so by virture of that it already meets all the below-stated checklist.
[x] Passed security review or already Wikimedia deployed
[x] Voting CI structure tests
[x] Runs MediaWiki-CodeSniffer
[x] Runs phan
[x] Supports MySQL, SQLite, and Postgres (no schema changes)
[x] GPL v2 or later compatible license
[x] Extension's default configuration provides optimal experience (this extension is needed to make MW default truly optimal)
[x] Tested with web installer (not applicable)
====Architecture====
1. One php file for a single hook
2. Two trivial modules: styles and script.
3. Four i18n messages