staging: horsea - #3118
Conversation
* fix(alert): added `close-label` for localization * docs(alert): localization demo * fix(alert): need explict attribute name * fix(alert): use newer accesssible-label not depreated property
🦋 Changeset detectedLatest commit: f5a2f43 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for red-hat-design-system ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PR Summary by Qodorh-alert: add localized close button label via
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
|
Size Change: +310 B (+0.1%) Total Size: 323 kB 📦 View Changed
ℹ️ View Unchanged
|
Documentation Health
|
| Category | Score | |
|---|---|---|
| Element description | 11/25 | |
| Attribute documentation | 20/20 | ✅ |
| Slot documentation | 15/15 | ✅ |
| CSS documentation | 15/15 | ✅ |
| Event documentation | 15/15 | ✅ |
| Demos | 0/0 | ❌ |
rh-alert (RhAlert) — 95/100 ✅
| Category | Score | |
|---|---|---|
| Element description | 25/25 | ✅ |
| Attribute documentation | 20/20 | ✅ |
| Slot documentation | 15/15 | ✅ |
| CSS documentation | 10/15 | |
| Event documentation | 15/15 | ✅ |
| Demos | 10/10 | ✅ |
rh-footer-universal (RhFooterUniversal) — 83/100 ✅
| Category | Score | |
|---|---|---|
| Element description | 23/25 | ✅ |
| Attribute documentation | 20/20 | ✅ |
| Slot documentation | 15/15 | ✅ |
| CSS documentation | 10/15 | |
| Event documentation | 15/15 | ✅ |
| Demos | 0/10 | ❌ |
rh-footer (RhFooter) — 95/100 ✅
| Category | Score | |
|---|---|---|
| Element description | 25/25 | ✅ |
| Attribute documentation | 20/20 | ✅ |
| Slot documentation | 15/15 | ✅ |
| CSS documentation | 10/15 | |
| Event documentation | 15/15 | ✅ |
| Demos | 10/10 | ✅ |
Recommendations:
- AlertCloseEvent: use RFC 2119 keywords (MUST, SHOULD, AVOID) to clarify requirements (Element description, +5 pts)
- rh-alert: reference design tokens or theme considerations in CSS descriptions (CSS documentation, +5 pts)
- rh-footer-universal: reference design tokens or theme considerations in CSS descriptions (CSS documentation, +5 pts)
- rh-footer-universal: add at least one demo with a URL (Demos, +5 pts)
- rh-footer-universal: add demos with descriptions (Demos, +5 pts)
Code Review by Qodo
1. Docs omit close-label
|
| /** Accessible label for the close button, used for localization. */ | ||
| @property({ attribute: 'close-label' }) closeLabel = 'Close'; |
There was a problem hiding this comment.
1. Docs omit close-label 🐞 Bug ⚙ Maintainability
This PR introduces a new public close-label attribute on <rh-alert>, but elements/rh-alert/README.md still lists only dismissable as a supported attribute, making the published API documentation incomplete. This reduces discoverability of the localization feature that the changeset and new demo are explicitly adding.
Agent Prompt
### Issue description
`<rh-alert>` now supports a new public `close-label` attribute (for localizing the close button’s accessible name), but the component README still enumerates only `dismissable` under “attributes”. This leaves the docs incorrect/incomplete for the newly shipped API.
### Issue Context
- The changeset announces the new API.
- `rh-alert.ts` implements it and the new demo uses it.
- `elements/rh-alert/README.md` does not mention `close-label` at all.
### Fix
- Update `elements/rh-alert/README.md` “attributes” section to include:
- `close-label` (string)
- purpose: accessible label for the dismiss/close button
- default: `Close`
- note: only relevant when `dismissable` is enabled (i.e., when the close button is rendered).
- (Optional) add a short usage snippet demonstrating localization (can reference the demo content).
### Fix Focus Areas
- elements/rh-alert/README.md[18-26]
- elements/rh-alert/rh-alert.ts[175-176]
- .changeset/clear-llamas-hang.md[1-5]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
* fix(footer): point RHDC domains to `www` and use `/en` in default slotted content * fix(footer): simplify global logo anchor accessible name * feat(footer): add a `logoHref` prop to the universal footer red hat logo * chore(footer): add changesets * test(footer): update RHDC URL to `https://www.redhat.com/en` * docs(footer): update slot and part docs to point to redhat.com/en * fix(footer): guard against empty `logo-href` attributes and provide a fallback * test(footer): add tests for various states of `logo-href` * test(footer): update RHDC url in test assertion Mostly for the benefit of AI
Staging: horsea release
Testing Instructions
Notes to Reviewers