feat(progress)!: port to pf-v6-progress element#3152
Conversation
Update progress bar element for PatternFly v6 with inline SVG status icons, InternalsController, `helper-text` `@slot`, `value-text` and `static-width` properties, `singleline` measure location, and v6 design tokens with CSS grid layout. Closes #3031 Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
Move progressbar role and all ARIA to host via InternalsController, fix aria-valuemax to always be 100, remove unnecessary value reflection, guard fade-in animation with prefers-reduced-motion, rename failure demos to danger, and inline demo wrapper styles. Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 9d536fd 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(progress)!: port to pf-v6-progress element"
} |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
This comment has been minimized.
This comment has been minimized.
bennypowers
left a comment
There was a problem hiding this comment.
please implement https://www.patternfly.org/components/progress#interactive-status-icon-and-measure-location demo (and all other missing demos from react site)
and rework the prose in the README tables - it's not clear what, if any, differences exist for e.g. the measureLocation prop.
| @property({ attribute: 'accessible-labelledby' }) accessibleLabelledby?: string; | ||
|
|
||
| /** Space-separated ID(s) of elements that describe this progress bar. Resolves cross-root aria-describedby via ElementInternals. */ | ||
| @property({ attribute: 'accessible-describedby' }) accessibleDescribedby?: string; |
There was a problem hiding this comment.
Maybe I misunderstood, but this uses the reflection api resolving IDs outward. ariaLabelledByElements, ariaDescribedByElements. That said if the ID doesn't exist in the lightdom, but a shadowroot of another component, then that is an issue for sure. If that is the suggestion in this comment, then we can remove it.
Summary
<pf-v5-progress>to<pf-v6-progress>web component for PatternFly v6role="progressbar"via ElementInternals withariaValueNow,ariaValueMin,ariaValueMaxdescriptionfor visible title text,accessible-labelfor screen reader name,accessible-labelledbyandaccessible-describedbyfor cross-root ARIA via ElementInternalsaccessible-labelledby→accessible-label→description→"Progress status"size(sm/lg),measure-location(outside/inside/none),variant(success/warning/danger)
truncatedboolean for CSS ellipsis overflow on description texthide-status-iconto suppress variant icon while keeping variant bar colorvalue-textfor custom aria-valuetext (finite step, step instruction)helper-textslot for supplementary content below the bardescriptionis setprefers-reduced-motionsupport--pf-v6-c-progress--*design tokens with hex fallbacksIntentional divergences from React
title→descriptionattribute to avoid shadowing native HTMLtitlearia-labelabstracted behindaccessible-labelattribute per ADVICE.mdaria-labelledbyabstracted behindaccessible-labelledbyattribute, resolves IDs toariaLabelledByElementsvia ElementInternalsaria-describedbyabstracted behindaccessible-describedbyattribute, resolves IDs toariaDescribedByElementsvia ElementInternalsisTitleTruncated→truncatedboolean attributelabel(ReactNode) →value-text(string only)measureLocation="top"is the default (no attribute needed)helperTextprop →helper-textslot for rich contenttooltipPositionnot implemented (blocked onpf-v6-tooltip)pf-v6-iconwhen availableTest plan
npm run testpasseslocalhost:8000with?rendering=chromelessprogressbarrole with correct labelaccessible-labelsets aria-label without rendering visible textaccessible-labelledbyresolves IDs and setsariaLabelledByElementsaccessible-describedbyresolves IDs and setsariaDescribedByElementstruncatedtruncates description with ellipsishide-status-iconsuppresses variant icon while keeping bar colorprefers-reduced-motiondisables danger jiggle animationcem healthscore above 80%Assisted-By: Claude noreply@anthropic.com
Testing Instructions
Notes to Reviewers