feat(banner): port pf-v5-banner to pf-v6-banner#3143
Conversation
🦋 Changeset detectedLatest commit: d441d78 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 pf-v5-banner to pf-v6-banner"
} |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
| @property({ type: Boolean, reflect: true }) sticky = false; | ||
|
|
||
| /** Text announced by screen readers to indicate the type of banner. */ | ||
| @property({ attribute: 'screen-reader-text' }) screenReaderText?: string; |
There was a problem hiding this comment.
this attribute name is vague: it's not immediately clear which text this is. only after reading the jsdoc does the user discover that this text describes the "type" of banner. "type", mind you, is not an attribute on this element, so that term is also vague. moreover, we use accessible-label as the name for screen reader texts in other elements.
@adamjohnson wdyt?
There was a problem hiding this comment.
It's directly from React, screenReaderText is the prop name in Banner.tsx. The agent mapped it to screen-reader-text as the HTML attribute (dash-case convention).
I definitely think this is where we can make a judgment call, but we have to ensure we are consistent across the board here.
There was a problem hiding this comment.
in this case, let's lean to "authentic to the end user react experience" more, and "authentic to the pfe developer experience" more
|
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. |
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