Skip to content

Commit ae8d4ba

Browse files
authored
Merge branch 'main' into ghes-3.9-rc
2 parents ceb6f76 + d164436 commit ae8d4ba

117 files changed

Lines changed: 956 additions & 434 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
87.5 KB
Loading
35.7 KB
Loading
115 KB
Loading
89.7 KB
Loading
31.5 KB
Loading
37 KB
Loading

components/GenericError.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ export const SimpleHeader = () => {
3939
const router = useRouter()
4040
return (
4141
<div className="border-bottom color-border-muted no-print">
42-
<header className="container-xl p-responsive py-3 position-relative d-flex width-full">
42+
<header
43+
className="container-xl p-responsive py-3 position-relative d-flex width-full"
44+
role="banner"
45+
aria-label="Main"
46+
>
4347
<div className="d-flex flex-items-center" style={{ zIndex: 3 }} id="github-logo-mobile">
4448
<Link href={`/${router.locale}`}>
4549
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}

components/article/ToolPicker.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ function showToolSpecificContent(tool: string, supportedTools: Array<string>) {
1717
.filter((el) => supportedTools.some((tool) => el.classList.contains(tool)))
1818
.forEach((el) => {
1919
el.style.display = el.classList.contains(tool) ? '' : 'none'
20+
21+
// hack: special handling for minitoc links -- we can't pass the tool classes
22+
// directly to the Primer NavList.Item generated <li>, it gets passed down
23+
// to the child <a>. So if we find an <a> that has the tool class and its
24+
// parent is an <li>, we hide/unhide that element as well.
25+
if (el.tagName === 'A' && el.parentElement && el.parentElement.tagName === 'LI') {
26+
el.parentElement.style.display = el.classList.contains(tool) ? '' : 'none'
27+
}
2028
})
2129

2230
// find all tool-specific *inline* elements and hide or show as appropriate

components/page-header/Header.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export const Header = () => {
135135
'color-bg-default p-2 position-sticky top-0 z-1 border-bottom',
136136
scroll && 'color-shadow-small',
137137
)}
138+
role="banner"
138139
>
139140
<div
140141
className="d-flex flex-justify-between p-2 flex-items-center flex-wrap"

components/sidebar/SidebarNav.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export const SidebarNav = ({ variant = 'full' }: Props) => {
2525
style={{ width: 326, height: 'calc(100vh - 65px)', top: '65px' }}
2626
>
2727
{variant === 'full' && currentProduct && (
28-
<div className={cx('d-none px-4 pb-3 border-bottom d-xl-block')}>
28+
<nav
29+
className={cx('d-none px-4 pb-3 border-bottom d-xl-block')}
30+
aria-labelledby={currentProduct.name}
31+
>
2932
<AllProductsLink />
3033
{currentProduct && (
3134
<div className="mt-3">
@@ -41,7 +44,7 @@ export const SidebarNav = ({ variant = 'full' }: Props) => {
4144
</div>
4245
)}
4346
{variant === 'full' && isRestPage && <ApiVersionPicker />}
44-
</div>
47+
</nav>
4548
)}
4649
<div
4750
className={cx(
@@ -51,13 +54,11 @@ export const SidebarNav = ({ variant = 'full' }: Props) => {
5154
style={{ width: 326, height: 'calc(100vh - 175px)', paddingBottom: sidebarPaddingBottom }}
5255
role="banner"
5356
>
54-
<nav aria-labelledby="title-h1">
55-
{!currentProduct || currentProduct.id === 'search' ? (
56-
<SidebarHomepage />
57-
) : (
58-
<SidebarProduct />
59-
)}
60-
</nav>
57+
{!currentProduct || currentProduct.id === 'search' ? (
58+
<SidebarHomepage />
59+
) : (
60+
<SidebarProduct />
61+
)}
6162
</div>
6263
</div>
6364
)

0 commit comments

Comments
 (0)