Skip to content

Commit

Permalink
fix merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolinisoup committed Feb 16, 2023
1 parent fe4b4b6 commit 2f84bb8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/PageHeader/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,15 @@ const Navigation: React.FC<React.PropsWithChildren<NavigationProps>> = ({
'aria-label': ariaLabel,
'aria-labelledby': ariaLabelledBy,
}) => {
// TODO: use warning utility function when it is merged https://github.com/primer/react/pull/2901/
if (__DEV__) {
if (as === 'nav' && !ariaLabel && !ariaLabelledBy) {
// eslint-disable-next-line no-console
console.warn(
'Use `aria-label` or `aria-labelledby` prop to provide an accessible label to the `nav` landmark for assistive technology',
)
}
}
return (
<Box
as={as}
Expand Down

0 comments on commit 2f84bb8

Please sign in to comment.