@primer/doctocat-nextjs 0.7.0 → 0.7.1-rc.a9c9ea3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @primer/doctocat-nextjs
2
2
 
3
+ ## 0.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#68](https://github.com/primer/doctocat-nextjs/pull/68) [`b75584e`](https://github.com/primer/doctocat-nextjs/commit/b75584edb6936a70ea94925fc743989422cc3d9a) Thanks [@janmaarten-a11y](https://github.com/janmaarten-a11y)! - Improve screen reader accessibility by updating sidebar navigation heading hierarchy. The sidebar title now uses a semantic `<Heading>` component with visually hidden text to clarify it's a navigation area, and is properly connected to the `<NavList>` via `aria-labelledby`.
8
+
3
9
  ## 0.7.0
4
10
 
5
11
  ### Minor Changes
@@ -1,7 +1,7 @@
1
1
  import React, {useMemo} from 'react'
2
2
  import NextLink from 'next/link'
3
3
  import {NavList} from '@primer/react'
4
- import {Text} from '@primer/react-brand'
4
+ import {Heading} from '@primer/react-brand'
5
5
  import type {Folder, MdxFile, PageMapItem} from 'nextra'
6
6
 
7
7
  import styles from './Sidebar.module.css'
@@ -49,12 +49,12 @@ export function Sidebar({pageMap}: SidebarProps) {
49
49
  return (
50
50
  <div className={styles.Sidebar}>
51
51
  {activeHeaderLink && (
52
- <Text size="400" weight="semibold" className={styles.Sidebar__title}>
52
+ <Heading as="h2" size="6" className={styles.Sidebar__title} id="nav-list-heading">
53
53
  {activeHeaderLink.title}
54
- </Text>
54
+ <span className="visually-hidden"> navigation</span>
55
+ </Heading>
55
56
  )}
56
-
57
- <NavList className={styles.NavList} aria-label="Menu links">
57
+ <NavList className={styles.NavList} aria-labelledby="nav-list-heading">
58
58
  {reorderedPageMap.map(item => {
59
59
  if (item.hasOwnProperty('data')) return null
60
60
 
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@primer/doctocat-nextjs",
3
- "version": "0.7.0",
3
+ "version": "0.7.1-rc.a9c9ea3",
4
4
  "description": "A Next.js theme for building Primer documentation sites",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/primer/doctocat-nextjs.git"
10
+ },
7
11
  "scripts": {
8
12
  "check": "tsc --noEmit",
9
13
  "lint": "eslint '**/*.{js,ts,tsx,md,mdx}' --max-warnings=0 --config ./.eslintrc.cjs",