User story
As a user adding sub-references in wikitext I want to be informed about when there are mistakes in the syntax.
Context
Whenever there's an issue with unknown/misspelled attribute names in <ref> tags there is currently an error message that's implemented with the cite_error_ref_too_many_keys i18n key.
Current behavior (since T299280): Cite error: Invalid parameter in <ref> tag
In the context of Sub-referencing (product board) we expect the existing message to show up quite often when users make mistakes in the new details="…" attribute. The most obvious example is a missing "s" at the end of detail="…".
Suggestions:
- Re-classify the message from a fatal to a warning. This makes sure the <ref> is rendered as normal and the error message is moved down to the reference list. Already done via https://gerrit.wikimedia.org/r/1142560.
- Cite error: Invalid parameter "detail" in <ref> tag. Did you mean "details"? Proof of concept: https://gerrit.wikimedia.org/r/1126623
- Cite error: Invalid <ref> tag; “detail” is not a supported attribute.
- Cite error: Invalid <ref> tag; the supported attributes are: name, details, follow, …
- …?
Open questions:
- Is it technically possible to include the invalid attribute name? What if there is more than one?
- Yes. We can show the first or a comma-separated list.
- Is a special message for common typos like "detail" worth it?
- Probably not. While technically possible it could cover only very few known typos.
- Terminology should be consistent across messages. Should it be "attribute" or "parameter" or something else? WMDE-Design?

