feat(banner)!: port to pf-v6-banner#3143
Conversation
🦋 Changeset detectedLatest commit: a4f27c9 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 |
✅ Commitlint tests passed!More Info{
"valid": true,
"errors": [],
"warnings": [],
"input": "feat(banner)!: port to pf-v6-banner"
} |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
this should delete pf-v5-banner and update all references |
Ok, good, that answers a question I had about the exports previously. We could update the |
|
Need to update README.md to include divergences still. |
|
The React Banner uses a visually-hidden {screenReaderText && <span className="pf-v6-screen-reader">{screenReaderText}</span>}
{children}For the web component, I'd like to use The problem with
|
| Approach | SR announces | Pros | Cons |
|---|---|---|---|
| sr-only span (React) | "Success: Job 25 completed" | Matches React exactly, simple | Extra DOM node, no live region, no semantic role |
ariaLabel |
"Success:, status" | No extra DOM | Content hidden from AT, wrong |
ariaDescription + role="status" |
"Job 25 completed ... Success ... status" | Content first, live region, no extra DOM, semantic | Different ordering than React, ariaDescription is newer (baseline 2024) |
Looking for a11y review on whether the ariaDescription ordering (content first, then status context) is acceptable, or whether the React-style prepended text is preferred.
|
in badge, we removed screenReaderText and advised users to slot visually hidden text into the anonymous slot. Should do that here for API simplicity, or is the difference intentional -- banner is more opinionated (status banners SHOULD have sr text, so the element provides a shortcut) while badge is simpler (just a pill, user decides)? |
instruct downstream users to slot visually hidden text instead
Summary
Closes #2983
pf-v5-bannerpf-v5-bannertopf-v6-bannerand aligned with the React v6 componentvariantattribute with separatecolor(8 decorative colors) andstatus(5 semantic statuses) attributes, matching React's split APIscreen-reader-textattribute for visually-hidden status announcements (WCAG 1.3.1)stickyattribute (maps to ReactisSticky)iconattribute/slot — icons are now composed in the default slot, matching React v6light-dark()for standalone usageDeviations from React
pf-v5-icon: The status demo composes icons in the default slot usingpf-v5-iconbecausepf-v6-iconis not yet merged tostaging/pfv6. Once pf-v6-icon lands, the status demo should be updated to usepf-v6-iconwith therh-ui-*-fillicon set to match the React demos visually.isStickyas a prop but no dedicated demo on patternfly.org. We include a standalone sticky demo since the behavior requires scrollable content to verify — this was carried forward from the v5 element.Test plan
/review-a11y— no critical issues/review-api— no critical issues/review-demos— all demos match patternfly.org paritycem health— 87/100 (above 80% threshold)http://localhost:8000/elements/banner/demo/{slug}?rendering=chromeless🤖 Generated with Claude Code