id

Last modified by Lucas Charpentier on 2026/10/27 10:28

Audit

Macro ID
id
Source
XS
Type
Generator
Classification reason
The macro has no content and its only output is an invisible anchor built from its name parameter, so it is classified as a generator.
Status
Reviewed
Criteria version
15.20
XWiki version
18.8.0
Audit date
2026-10-16
Auditor
Compared macros
toc children

Sources

Where to gather the information the criteria are checked against, see Gather the sources.

SourceWhat it givesUsed forWhere
DocumentationParameters, default values and examples, including the most common exampleL2, L3, and the criteria measured with the most common examplehttps://extensions.xwiki.org/xwiki/bin/view/Extension/Id%20Macro#HUsage
Source codeHow the macro declares its parameters and content: types, groups, features, advanced and hidden flags, constraints, content type, inline supportC4, C5, C7, C8, C9, C13, E4, E6https://github.com/xwiki/xwiki-rendering/blob/xwiki-rendering-18.8.0/xwiki-rendering-macros/xwiki-rendering-macro-id/src/main/java/org/xwiki/rendering/internal/macro/id/IdMacro.java
Macro descriptorWhat the Edit Macro dialog is built from, on design.xwiki.orgD1, D2, C1 to C9, E4Descriptor, list of macros with their categories
TranslationsThe name, description and parameter names in each languageD1, D2, D4, C1l10n.xwiki.org
Uses in XWiki pagesHow XWiki itself uses the macro, a realistic example when the documentation has noneL3, C2, C3, C6, C8, C9Search the xwiki organization on GitHub
Compared macrosThe audits of the macros of the same typeL1, D3toc, children
Other sources specific to this macro
CriterionResultNotes
D1 wordingKOthe name "Id" is a code identifier, not the user's word for what the macro adds. The description itself says that "In HTML for example this is called an Anchor", and the French and German names are "Ancre" and "Anker". In English, the Insert Macro dialog and the Quick Actions menu show "Id".
D2 summaryKO"Allows putting a reference/location in a page. In HTML for example this is called an Anchor. It allows pointing to that location, for example in links." is three sentences and 26 words, with technical terms, "reference/location" and "In HTML". It does not say plainly that the macro adds an invisible anchor that links can jump to.
D3 categoryOKNavigation, like the compared macros toc and children.
D4 quick-actionKOQuick Actions finds the macro first for "Id", "id", the synonym "anchor" and the French name "Ancre". The synonyms "bookmark" and "target" give no result: typing "/bookmark" lists nothing.
L1 consistencyOKcompared with toc and children: like them it has no content and is in Navigation. Unlike them, its name parameter is mandatory, so the Quick Action opens the Edit Macro dialog instead of inserting the macro right away. This is by design: an anchor without a name cannot be linked to.
L2 doc-parametersKOthe parameter is only documented on the legacy extensions.xwiki.org page, not in the new documentation.
L3 doc-exampleOKthe documentation gives {{id name="someid" /}} and an example with a link jumping to it, [[Click here to jump to anchor "someid">>||anchor="someid"]] ; both render without error.
I1 patternOKcompared with children, the reference generator: from the Insert Macro dialog both open the Edit Macro dialog. From Quick Actions, the "Id" entry opens the Edit Macro dialog, since the name is mandatory, the generic behavior of a macro with a mandatory parameter and no dedicated Quick Action.
I2 zero-configOKsubmitting the Edit Macro dialog with the empty mandatory name keeps the dialog open with no message, the generic behavior of the dialog.
I3 instantN/A
I4 cursorN/A
I5 focusOKthe only field, Name, is mandatory, visible without scrolling and focused when the dialog opens.
E1 wysiwygKOthe editor only shows the generic "macro:id" placeholder for {{id name="someid"/}} , without the anchor name, while view mode shows nothing, since an anchor is invisible. The placeholder should say that it is an anchor and give its name, so that the user can find it and link to it.
E2 errorsKOthe name is accepted silently whatever its value. {{id name=""/}} renders an empty id="" that no link can reach, {{id name="my anchor"/}} renders an id with a space, which HTML does not allow, {{id name="dup"/}}{{id name="dup"/}} renders two elements with the same id, and = Intro = {{id name="HIntro"/}} duplicates the id generated for the heading; in each case no message warns the user, and a link to a duplicated anchor silently goes to the first one.
E3 nestingOKin a list item, a table cell and a box, {{id name="someid"/}} renders its anchor with no error, inline in the list item and the table cell, and the macro can be edited through its dialog as at the top level.
E4 inline-supportOKthe macro declares inline support and renders an inline anchor inside a sentence: one {{id name="mid"/}} two gives one paragraph, with no block breaking the line.
E5 emptyN/A
E6 inplaceN/A

Parameters

ParameterC1 clarityC2 mandatoryC3 defaultsC4 input-assistanceC5 groupsC6 orderC7 alternativesC8 advancedC9 technicalC13 constraintsNotes
nameKOOKN/AOKOKOKN/AOKOKKO

C1: the description "the identifier string" is technical and does not say what the name is for, the anchor name that a link targets with anchor="...", nor what value is expected, like a single word without spaces. The French "Le texte de l'ancre à insérer" and German "Die sogenannte ID des Ankers" are clearer.

C2: mandatory with no default, which is right: the user needs to know the name to link to the anchor.

C4: a text field, which fits a new name chosen by the user.

C13, minor: the macro accepts any text, so no format is declared: an empty name or a name with spaces gives an invalid HTML id, see E2 and XRENDERING-821.

KOs and tickets

Every KO needs a ticket covering it, see Report the KOs. One ticket can cover several KOs. Known issues filed for this macro are suggested in italics: link them as existing tickets when they cover the KO.

KOCriterionExisting ticketsNew tickets
D1D1 wordingXWIKI-25493
D2D2 summaryXWIKI-25493
D4D4 quick-actionXWIKI-25444
L2L2 doc-parametersXINFRA-525
E1E1 wysiwygXWIKI-25536
E2E2 errorsXRENDERING-821XCOMMONS-3847 (partial), XRENDERING-823 (partial)
C1:nameC1 clarity, nameXWIKI-25493
C13:nameC13 constraints, nameXRENDERING-821
Success

Every KO is covered by a ticket.

Tickets

TicketOriginKOs coveredKOs partly covered
XRENDERING-821ExistingC13:name E2
XCOMMONS-3847NewE2
XRENDERING-823NewE2
XWIKI-25444NewD4
XWIKI-25493NewC1:name D1 D2
XINFRA-525NewL2
XWIKI-25536NewE1

Known issues of this macro

No known issue is specific to this macro.
68 more known issues affect every macro: see the Known issues.

Get Connected