Skip to content

Conversation

ceford
Copy link
Collaborator

@ceford ceford commented Sep 11, 2025

PR Type

Documentation


Description

  • Enhanced headertag field documentation with preset tags list

  • Enhanced moduletag field documentation with preset tags list

  • Added examples showing custom tag options

  • Updated field attribute descriptions for clarity


Diagram Walkthrough

flowchart LR
  A["Documentation Update"] --> B["headertag.md"]
  A --> C["moduletag.md"]
  B --> D["Added preset tags list"]
  B --> E["Custom options example"]
  C --> F["Added preset tags list"]
  C --> G["Custom options example"]
Loading

File Walkthrough

Relevant files
Documentation
headertag.md
Enhanced headertag field documentation with examples         

docs/general-concepts/forms-fields/standard-fields/headertag.md

  • Updated description to specify preset tags (h1-h6, p, div)
  • Clarified field attributes removing mandatory/optional labels
  • Added two XML examples: basic and with custom options
  • Enhanced documentation structure and clarity
+28/-9   
moduletag.md
Enhanced moduletag field documentation with examples         

docs/general-concepts/forms-fields/standard-fields/moduletag.md

  • Updated description to list preset HTML5 tags
  • Clarified field attributes removing mandatory/optional labels
  • Added two XML examples: basic and with custom options
  • Fixed typo in example XML (ame to name)
+26/-7   

Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Incorrect Preset Tags

The listed preset tags include search, which is not a standard HTML element, and summary, which is not suitable as a generic wrapper. Verify the preset list against the actual implementation and valid HTML elements.

The **moduletag** form field type provides a dropdown list of tags for a module wrapper. The preset list of tags includes address, article, aside, details, div, footer, header, main, nav, search, section and summary. Custom modules may specify additional tags.
Misleading Example

Example adds fieldset and li as custom wrapper options; these are context-dependent and can lead to invalid markup for a module wrapper. Consider using context-agnostic container elements in examples.

<option value="figure">figure</option> 
<option value="fieldset">fieldset</option>
<option value="li">li</option> 
Misleading Example

Example adds figcaption, legend, label, and summary as custom header tags; these are not appropriate heading elements and can encourage invalid semantics. Use heading-related alternatives if demonstrating extensibility.

    <option value="figcaption">figcaption</option> 
    <option value="legend">legend</option>
    <option value="label">label</option> 
    <option value="summary">summary</option>
</field>

Copy link
Contributor

qodo-merge-pro bot commented Sep 11, 2025

PR Code Suggestions ✨

Latest suggestions up to ce835b1

CategorySuggestion                                                                                                                                    Impact
Incremental [*]
Use semantically appropriate tags

Consider the semantic appropriateness of these additional options for module
titles. Some tags like 'legend' and 'summary' have specific semantic meanings
that may not be suitable for general module titles.

docs/general-concepts/forms-fields/standard-fields/headertag.md [40-43]

 <option value="span">span</option> 
 <option value="figcaption">figcaption</option> 
-<option value="legend">legend</option>
-<option value="summary">summary</option>
+<option value="strong">strong</option>
+<option value="em">em</option>
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that the example tags legend and summary are semantically inappropriate for a module title, and promoting correct semantics in documentation is important.

Low
Use appropriate wrapper tags

Ensure the additional tag examples are semantically appropriate for module
wrappers. The 'form' tag should only be used when the module actually contains
form elements to maintain proper HTML semantics.

docs/general-concepts/forms-fields/standard-fields/moduletag.md [40-42]

 <option value="blockquote">blockquote</option> 
 <option value="figure">figure</option> 
-<option value="form">form</option>
+<option value="dialog">dialog</option>
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly points out that using a form tag as a generic module wrapper is semantically incorrect, improving the quality of the documentation's examples.

Low
Clarify HTML tag terminology

Add clarity by specifying that these are HTML tags and explain the purpose of
each tag type more clearly for better understanding.

docs/general-concepts/forms-fields/standard-fields/headertag.md [6]

-The **headertag** form field type provides a dropdown list of tags for a module title. The preset list of tags includes h1 to h6, p and div. Custom modules may specify additional tags.
+The **headertag** form field type provides a dropdown list of HTML tags for a module title. The preset list includes semantic heading tags (h1 to h6), paragraph tag (p), and generic container (div). Custom modules may specify additional HTML tags.
  • Apply / Chat
Suggestion importance[1-10]: 4

__

Why: The suggestion improves documentation clarity by explicitly mentioning HTML tags and their purpose, which is helpful for users.

Low
  • More

Previous suggestions

✅ Suggestions up to commit bc31245
CategorySuggestion                                                                                                                                    Impact
General
Replace invalid example tag
Suggestion Impact:The commit removed the li option from the example, addressing the invalid tag concern, though it did not replace it with span (used form instead).

code diff:

-        <option value="li">li</option> 
+        <option value="form">form</option> 

Replace the li example with a tag that is valid standalone, since li is only
valid inside lists. Using span avoids encouraging invalid HTML in examples.

docs/general-concepts/forms-fields/standard-fields/moduletag.md [42]

-<option value="li">li</option>
+<option value="span">span</option>

[Suggestion processed]

Suggestion importance[1-10]: 6

__

Why: The suggestion correctly points out that using li as a module wrapper tag is invalid HTML, as it should only be a child of a list element, thus improving the example's correctness.

Low
Avoid context-restricted tag in example
Suggestion Impact:The commit added a span option to the list, aligning with the suggestion, but it did not remove the summary option; thus it partially implemented the suggestion.

code diff:

+        <option value="span">span</option> 
         <option value="figcaption">figcaption</option> 
         <option value="legend">legend</option>
-        <option value="label">label</option> 
         <option value="summary">summary</option>
     </field>

Replace summary with a more appropriate inline element (e.g., span), since
summary is only valid inside details and is not suitable for a header tag. This
prevents examples from promoting invalid markup.

docs/general-concepts/forms-fields/standard-fields/headertag.md [43]

-<option value="summary">summary</option>
+<option value="span">span</option>

[Suggestion processed]

Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that summary is not a valid header tag as it's only valid within a details element, and proposing a change prevents an example that produces invalid HTML.

Low
Possible issue
Remove invalid preset tags
Suggestion Impact:The commit updated the description to remove "search" and "summary" from the preset tags and rephrased the sentence, aligning with the suggestion’s intent.

code diff:

-The **moduletag** form field type provides a dropdown list of tags for a module wrapper. The preset list of tags includes address, article, aside, details, div, footer, header, main, nav, search, section and summary. Custom modules may specify additional tags.
+The **moduletag** form field type provides a dropdown list of tags for a module wrapper. The preset list of tags includes most suitable wrapper tags: address, article, aside, details, div, footer, header, main, nav and section. Custom modules may specify additional tags.

Remove the non-standard HTML tag search and the context-restricted summary from
the preset list to avoid encouraging invalid markup. Keep only valid, broadly
applicable wrapper elements in the documented defaults.

docs/general-concepts/forms-fields/standard-fields/moduletag.md [6]

-The **moduletag** form field type provides a dropdown list of tags for a module wrapper. The preset list of tags includes address, article, aside, details, div, footer, header, main, nav, search, section and summary. Custom modules may specify additional tags.
+The **moduletag** form field type provides a dropdown list of tags for a module wrapper. The preset list of tags includes address, article, aside, details, div, footer, header, main, nav and section. Custom modules may specify additional tags.

[Suggestion processed]

Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies that summary is not a valid general-purpose module wrapper tag, but incorrectly claims search is a non-standard tag.

Low

@ceford ceford merged commit c3704b9 into joomla:main Sep 13, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant