Skip to content

Conversation

@blunteshwar
Copy link
Contributor

@blunteshwar blunteshwar commented Oct 17, 2025

Overview

This PR reorganizes the grid README.md to follow the established documentation standards structure, improving accessibility and consistency with other components.

Changes Made

Structure Reorganization

  • Overview: Replaced "Description" with "Overview" section and expanded component description to better explain its role as a virtualized grid component
  • Usage: Updated import code blocks with proper language syntax highlighting (bash, javascript)
  • Anatomy: Added new section describing the component's key parts:
    • Virtualized container
    • Grid items rendered via renderItem
    • Roving tabindex system
    • Configurable layout properties
  • Options: Created comprehensive properties documentation including:
    • items property with array examples
    • renderItem method with detailed explanation
    • itemSize property with object configuration
    • gap property for spacing control
    • focusableSelector property for keyboard navigation
  • Behaviors: Added new section documenting:
    • Virtualization behavior and performance benefits
    • Focus management with roving tabindex pattern
    • Selection management with code examples
  • Accessibility: Enhanced accessibility section with:
    • Keyboard navigation details with <kbd> tags
    • ARIA attributes documentation and examples
    • Focusable elements guidance
  • Example: Retained existing comprehensive example at the end

Content Improvements

  • Enhanced component description to clarify its relationship with lit-virtualizer
  • Added documentation for all key properties (items, renderItem, itemSize, gap, focusableSelector)
  • Provided JavaScript code examples for programmatic interaction
  • Included detailed explanation of virtualization benefits
  • Added selection management examples showing state handling
  • Documented roving tabindex pattern with keyboard interaction details

Accessibility Enhancements

  • Clarified keyboard navigation using the roving tabindex pattern
  • Documented all necessary ARIA attributes for grid implementation
  • Explained focus management for keyboard users
  • Added proper semantic markup guidance with <kbd> tags for keyboard actions
  • Included comprehensive ARIA attributes examples for both grid and items

Testing

  • Verified all existing content is preserved
  • Confirmed proper markdown syntax and formatting
  • Checked consistency with documentation standards
  • Reviewed accessibility improvements
  • Ensured code blocks use proper language highlighting

Related Documentation

  • Follows structure outlined in Adding a Component Documentation Standards
  • Maintains consistency with accordion, button, meter, progress bar, progress circle, tooltip, and color-area README files
  • References documentation structure from the adding-a-component guide

Documentation Standards Compliance

This reorganization ensures the grid documentation:

  • Uses proper heading structure for organization and navigation
  • Maintains consistent main headings (level 2 and 3) across components
  • Uses <kbd> tags to semantically indicate keyboard input
  • Provides accessible code examples
  • Includes comprehensive accessibility section with ARIA guidance
  • Uses sentence case for all headings
  • Follows plain language principles for better understanding

This reorganization makes the grid documentation more accessible, easier to navigate, and consistent with the established documentation standards across the Spectrum Web Components library.

@blunteshwar blunteshwar requested a review from a team as a code owner October 17, 2025 05:50
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

⚠️ No Changeset found

Latest commit: a627684

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2025

📚 Branch Preview

🔍 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-5810

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@github-actions
Copy link
Contributor

Tachometer results

Currently, no packages are changed by this PR...

@coveralls
Copy link
Collaborator

coveralls commented Oct 17, 2025

Pull Request Test Coverage Report for Build 18681605860

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.966%

Totals Coverage Status
Change from base Build 18666105226: 0.0%
Covered Lines: 34247
Relevant Lines: 34776

💛 - Coveralls

@blunteshwar blunteshwar requested a review from nikkimk October 17, 2025 09:41
Copy link
Contributor

@nikkimk nikkimk left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@rubencarvalho rubencarvalho left a comment

Choose a reason for hiding this comment

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

Thanks! Left just 1 non-blocking comment

</script>
```

<!-- @todo make the example work for a keyboard Tracking in 5582-->
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to your changes, but do you know if this @todo is still relevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think after merging this PR we can get rid of this Todo

@blunteshwar blunteshwar merged commit c59ea1b into main Oct 21, 2025
27 checks passed
@blunteshwar blunteshwar deleted the SWC-427 branch October 21, 2025 12:09
shipg22 pushed a commit to shipg22/spectrum-web-components that referenced this pull request Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants