Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type UnderlineWrapperProps<As extends React.ElementType> = {
}

export const UnderlineWrapper = forwardRef((props, ref) => {
const {children, className, as: Component = 'nav', ...rest} = props
const {children, className, as: Component = 'div', ...rest} = props

Copilot AI Oct 29, 2025

Copy link

Choose a reason for hiding this comment

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

Changing the default element from 'nav' to 'div' is a breaking change that affects semantic HTML structure. The UnderlineNav component relies on this default to render as a

element, which is critical for accessibility. The test at line 67 in UnderlineNav.test.tsx expects a element, and tests at lines 68, 74, and 125 use getByRole('navigation') which will fail with this change. UnderlineNav explicitly passes as='nav' (line 144 in UnderlineNav.tsx), so this change should not break functionality, but the change removes semantic meaning from UnderlinePanels which doesn't pass an 'as' prop. Consider if this is intentional or if the default should remain 'nav' with UnderlinePanels explicitly passing as='div' if needed.

Suggested change
const {children, className, as: Component = 'div', ...rest} = props
const {children, className, as: Component = 'nav', ...rest} = props

Copilot uses AI. Check for mistakes.
return (
<Component
className={clsx(classes.UnderlineWrapper, className)}
Expand Down
Loading