Skip to content

Conversation

@joe-replin
Copy link
Contributor

@joe-replin joe-replin commented Jan 22, 2026

Fix

  • Fixes Completion calculations can return NaN when page content is optional #259
  • Prevent division-by-zero that produced NaN for page-level progress when a page contains only optional content.
  • Page-level progress now consistently returns 0 for fully-optional pages/components instead of NaN, preventing invalid CSS such as --adapt-pagelevelprogress-percentage: NaN%; which previously made the indicator render incorrectly.

Testing

  1. Set "_isOptional": true on page content (manually or via diagnostic extension)
  2. Navigate to menu and verify:
  3. Progress indicator shows "Optional" label below the progress bar
  4. Empty progress bar displays correctly (0% instead of appearing full due to NaN)
  5. Navigate within the optional page and check the navigation bar progress indicator
  6. Test with screen reader - verify it announces "Optional" before progress information
  7. Test non-optional content - verify no extra wrapper elements or labels appear
  8. Inspect DOM - confirm pagelevelprogress__indicator-group only exists when content is optional

@joe-replin
Copy link
Contributor Author

Thanks, @swashbuck.

Copy link
Contributor

@swashbuck swashbuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Completion calculations can return NaN when page content is optional

3 participants