Tighten rule matching scope and adjust header button layout#1823
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves rule/violation targeting accuracy in the header validation utilities (avoiding cross-matches between different header “families”) and refactors the classic desktop sortable table header UI from button-based headers to interactive th cells with updated styling and keyboard support.
Changes:
- Tightened violation/section matching to reduce unintended cross-matches (especially around
"source"rows andheaderName). - Refactored sortable table headers to use focusable
thcells with click + Enter/Space sorting behavior and updated ARIA attributes. - Updated classic desktop CSS and unit tests to align with the new sortable header structure and matching behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Scripts/ui/Table.ts | Reworks sortable header rendering and event handling; updates ARIA sort state targeting. |
| src/Scripts/ui/Table.test.ts | Updates header selectors and adds keyboard-sorting coverage for the new th-based headers. |
| src/Scripts/rules/ViolationUtils.ts | Tightens section matching so violations don’t apply across unrelated header families. |
| src/Scripts/rules/ViolationUtils.test.ts | Adds regression coverage for non-cross-matching violations between header families. |
| src/Scripts/rules/engine/HeaderValidationRules.ts | Narrows findSectionSubSection matching to prevent headerName fan-out except for "source". |
| src/Scripts/rules/engine/HeaderValidationRules.test.ts | Adds tests for the refined headerName matching behavior. |
| src/Content/classicDesktopFrame.css | Updates selectors/styles for the new .sortableHeaderCell header layout and new header IDs. |
macienMSFT
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request focuses on improving the accuracy of header matching in validation utilities, enhancing styling of sortable table headers, and updating tests to support these changes.
Header matching and validation improvements:
getViolationsForRowto require bothheaderandheaderNameto match for rows with explicit metadata, preventing cross-matching violations between different header families.findSectionSubSectionto only match byheaderNamefor rows whereheaderis"source", ensuring that rules targeting raw header content do not incorrectly apply to parsed child rows.Sortable table header accessibility and usability:
thelements with unique IDs andsortableHeaderCellclasses, replacing button-based headers. Added keyboard support (Enter/Space) for sorting, ARIA attributes for accessibility, and improved visual focus indicators. [1] [2] [3]Styling and selector adjustments:
sortableHeaderCellclass, ensuring consistent appearance and accessibility cues for sortable headers. [1] [2]#hop_header,#number_header) in both code and tests to match the new structure. [1] [2] [3]