Replace h3 tag with PF5 Title - #1246
Merged
Merged
Conversation
There was a problem hiding this comment.
Hey - I've found 2 issues, and left some high level feedback:
- In InventorySettings.js, the PF5 Title component shouldn’t wrap an
element; you can pass the translated string directly as children to avoid invalid nested headings.
- In InventoryAutoUpload.js, the ouiaId "rh-clout-inventory-title" appears to have a typo and should likely be "rh-cloud-inventory-title" for consistency with the label.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In InventorySettings.js, the PF5 Title component shouldn’t wrap an <h3> element; you can pass the translated string directly as children to avoid invalid nested headings.
- In InventoryAutoUpload.js, the ouiaId "rh-clout-inventory-title" appears to have a typo and should likely be "rh-cloud-inventory-title" for consistency with the label.
## Individual Comments
### Comment 1
<location path="webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettings.js" line_range="35" />
<code_context>
return (
<div className="inventory-settings">
- <h3>{__('Settings')}</h3>
+ <Title headingLevel="h3" size="lg" ouiaId="inventory-settings-title">
+ <h3>{__('Settings')}</h3>
+ </Title>
{[...settingKeys].map(key => {
</code_context>
<issue_to_address>
**issue (bug_risk):** Avoid nesting an <h3> inside the PatternFly Title component and pass the text directly instead.
Title already renders the correct heading tag based on `headingLevel`, so wrapping an extra `<h3>` inside creates nested headings and invalid semantics, which can impact accessibility and styling. Instead, let Title render the heading directly:
```jsx
<Title headingLevel="h3" size="lg" ouiaId="inventory-settings-title">
{__('Settings')}
</Title>
```
</issue_to_address>
### Comment 2
<location path="webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js" line_range="36" />
<code_context>
<FormGroup>
<Grid>
- <h3>{__('Red Hat Cloud Inventory')}</h3>
+ <Title headingLevel="h3" size="lg" ouiaId="rh-clout-inventory-title">
+ {__('Red Hat Cloud Inventory')}
+ </Title>
</code_context>
<issue_to_address>
**suggestion (typo):** The `ouiaId` value appears to have a typo and may be clearer as `rh-cloud-inventory-title`.
Please update the `ouiaId` to `rh-cloud-inventory-title` so it’s spelled correctly and aligns with the component name, which will make OUIA-based tests and tooling more reliable.
```suggestion
<Title headingLevel="h3" size="lg" ouiaId="rh-cloud-inventory-title">
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Lukshio
force-pushed
the
replaceH3
branch
2 times, most recently
from
August 19, 2026 16:32
043dc11 to
3f27b42
Compare
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.

No description provided.