Add some text to the loading dots for noscript users#72
Open
LordAro wants to merge 1 commit intoSemanticMediaWiki:masterfrom
Open
Add some text to the loading dots for noscript users#72LordAro wants to merge 1 commit intoSemanticMediaWiki:masterfrom
LordAro wants to merge 1 commit intoSemanticMediaWiki:masterfrom
Conversation
osnard
reviewed
Nov 3, 2025
| 'class' => 'mermaid-dots', | ||
| ] | ||
| ], | ||
| "Loading Mermaid graphics... (JavaScript required)" |
There was a problem hiding this comment.
I believe one should at least use <noscript> tags.
Example:
Html::rawElement(
'div',
[
'class' => 'mermaid-dots',
],
Html::element( 'p', [], "Loading Mermaid graphics..." )
.Html::element( 'noscript', [], "JavaScript is required to display this diagram. Please enable." )
)
(pseudocode, untested)
In general, such messages should use the MediaWiki I18N mechanism, so it can be displayed in the users language.
OT: For better WCAG compliance one could add dedicated attributes to the container <div>, like role="region", aria-busy="true" and aria-live="polite". This would also require some JavaScript that changes aria-busy and maybe adds an aria-label. In addition one should provide the "raw data" in such cases. But all this is clearly out of scope for this particular change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have a user that likes to disable Javascript. I know, I know...
However, because the css for the mermaid-dots are loaded via JS... it never displays anything, making it unclear that there's content missing from the page. So, add a little extra content to the mermaid-dots div.
There might be a better solution to get the mermaid-dots css included on pageload, rather than via js callback, but I don't know it.
I'd use on the page/template itself if I could, but it seems like mediawiki blocks usage of for whatever reason.