You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ngbProgressbar is not a native progress element, but probably it should adhere to implementation details.
If the max is being set to zero (FoL) by user as in #3386, this results in the NaN value returned internally and displayed by implementation. At the same time the assistive technology attributes are set to 0 for value and for max with the aria attributes.
I think adhering to default behavior would results in meaningful value being set and displayed.
In that practical case it would read 25 past the 1 (100%, finished). See native:
Just a question of the default max value I guess. Bootstrap prefers to have aria-valuemax="100" and we're mapping [max] directly to air-valuemax. I feel like it's more convenient also to have 100, not 1 and we have it clearly documented, so don't see any reason to change this at the moment.
#3386 is a display issue to me, when style=width:... is not set at all when max === 0.
Will mark this as a feature request and a breaking change for now.
@peterblazejewicz Using 1 as a fallback max value is not so good solution either. When the value is set to 0.5, then native progressbar will will be half-filled, while fully filled would be more semantically correct as it is 0.5 past 0 following your terminology.
Always fully filling the progressbar, when max=0 seems to be the most practical solution as I outlined in the #3386.
Bug description:
Surfaced in #3386
In the native progress
max
value, if present, should be always greater then zero and have a default value 1:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#Attributes
The
ngbProgressbar
is not a nativeprogress
element, but probably it should adhere to implementation details.If the
max
is being set to zero (FoL) by user as in #3386, this results in the NaN value returned internally and displayed by implementation. At the same time the assistive technology attributes are set to 0 for value and for max with the aria attributes.I think adhering to default behavior would results in meaningful value being set and displayed.
In that practical case it would read 25 past the 1 (100%, finished). See native:
https://codepen.io/blazejewicz/pen/zYOgXPW?&editable=true
Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/angular-ngb-progressbar-max
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: n/a
ng-bootstrap: 5.1.1
Bootstrap:
n/a
The text was updated successfully, but these errors were encountered: