From d823495c62a8a0073e97248962ebc86d5064bc43 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Tue, 30 Sep 2025 12:23:07 -0400 Subject: [PATCH 01/29] feat: enhance accessibility by adding ARIA attributes to table of contents items --- src/components/table-of-contents.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/table-of-contents.js b/src/components/table-of-contents.js index ec358a17ef3..aba552c5c8b 100644 --- a/src/components/table-of-contents.js +++ b/src/components/table-of-contents.js @@ -6,9 +6,15 @@ import usePage from '../hooks/use-page' const TableOfContentsItems = ({items, depth}) => ( <> - {items.map(item => ( + {items.map((item, index) => ( - 1 ? 4 : 2}}> + 1 ? 4 : 2}} + aria-setsize={items.length} + aria-posinset={index + 1} + aria-level={depth} + > {item.title} {item.items ? : null} From 114304e91d2324fdeec13da8b360dd28df8d7a11 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Tue, 30 Sep 2025 12:40:08 -0400 Subject: [PATCH 02/29] Revert "feat: enhance accessibility by adding ARIA attributes to table of contents items" This reverts commit d823495c62a8a0073e97248962ebc86d5064bc43. --- src/components/table-of-contents.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/table-of-contents.js b/src/components/table-of-contents.js index aba552c5c8b..ec358a17ef3 100644 --- a/src/components/table-of-contents.js +++ b/src/components/table-of-contents.js @@ -6,15 +6,9 @@ import usePage from '../hooks/use-page' const TableOfContentsItems = ({items, depth}) => ( <> - {items.map((item, index) => ( + {items.map(item => ( - 1 ? 4 : 2}} - aria-setsize={items.length} - aria-posinset={index + 1} - aria-level={depth} - > + 1 ? 4 : 2}}> {item.title} {item.items ? : null} From b98d6f4b89a0df52a40860b124b208662e41a2b9 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 12:42:04 -0400 Subject: [PATCH 03/29] fix: add tabIndex to VariantItem for improved accessibility --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index bb7ba9ca8e5..34204e84a37 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -16,7 +16,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` const VariantItem = ({title, shortName, url, active}) => { return ( - + {title} ) From cb7345e5b25640d31c10d479a0a76f0bd7f951d8 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 12:57:29 -0400 Subject: [PATCH 04/29] Revert "fix: add tabIndex to VariantItem for improved accessibility" This reverts commit b98d6f4b89a0df52a40860b124b208662e41a2b9. --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index 34204e84a37..bb7ba9ca8e5 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -16,7 +16,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` const VariantItem = ({title, shortName, url, active}) => { return ( - + {title} ) From d06a57d5f87b251bc332b5d67502e15996ef7edc Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 13:22:53 -0400 Subject: [PATCH 05/29] fix: add tabIndex to VariantItem for improved accessibility --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index bb7ba9ca8e5..484f980095f 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -16,7 +16,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` const VariantItem = ({title, shortName, url, active}) => { return ( - + {title} ) From 4fdf5cf1ab43ae2ea5be1163d25449624d0fd9d4 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 13:27:09 -0400 Subject: [PATCH 06/29] Revert "fix: add tabIndex to VariantItem for improved accessibility" This reverts commit d06a57d5f87b251bc332b5d67502e15996ef7edc. --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index 484f980095f..bb7ba9ca8e5 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -16,7 +16,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` const VariantItem = ({title, shortName, url, active}) => { return ( - + {title} ) From fbe09ce9533a50f62541fcc5b21445063327ba87 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 15:30:04 -0400 Subject: [PATCH 07/29] fix: add tabIndex to VariantItem for improved accessibility --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index bb7ba9ca8e5..c4e3c17f591 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -16,7 +16,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` const VariantItem = ({title, shortName, url, active}) => { return ( - + {title} ) From c28a14d765032a527f25e7f175fdc9f262b58711 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 15:32:37 -0400 Subject: [PATCH 08/29] Revert "fix: add tabIndex to VariantItem for improved accessibility" This reverts commit fbe09ce9533a50f62541fcc5b21445063327ba87. --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index c4e3c17f591..bb7ba9ca8e5 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -16,7 +16,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` const VariantItem = ({title, shortName, url, active}) => { return ( - + {title} ) From 24474505bb20554d3f494767577ab1104d34fdf8 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 15:51:42 -0400 Subject: [PATCH 09/29] fix: remove tabindex from VariantItem after component renders --- src/components/variant-select.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index bb7ba9ca8e5..833f669e8d8 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -15,8 +15,21 @@ const StyledOverlay = styled(ActionMenu.Overlay)` ` const VariantItem = ({title, shortName, url, active}) => { + const itemRef = React.useRef(null) + + React.useEffect(() => { + // Remove tabindex after the component renders + if (itemRef.current) { + const actionListItem = itemRef.current.closest('[role="listitem"]') || itemRef.current + if (actionListItem) { + actionListItem.removeAttribute('tabindex') + actionListItem.removeAttribute('tabIndex') + } + } + }, []) + return ( - + {title} ) From 37392ef19dd113ad1bafa5909ad0d620d2454c76 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 15:59:17 -0400 Subject: [PATCH 10/29] fix: simplify dependency array in VariantMenu useEffect --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index 833f669e8d8..9464d61252a 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -58,7 +58,7 @@ const VariantMenu = ({title, latest, current, prerelease, legacy}) => { if (locationChange.change && getNav.didVariantChange(locationChange.previous, locationChange.current)) { setOpen(false) } - }, [locationChange.change, locationChange.current, locationChange.previous]) + }, [locationChange]) return ( <> From 101d84aaa05da29390685eb685d5ab3a34e1f741 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:03:41 -0400 Subject: [PATCH 11/29] Revert "fix: simplify dependency array in VariantMenu useEffect" This reverts commit 37392ef19dd113ad1bafa5909ad0d620d2454c76. --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index 9464d61252a..833f669e8d8 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -58,7 +58,7 @@ const VariantMenu = ({title, latest, current, prerelease, legacy}) => { if (locationChange.change && getNav.didVariantChange(locationChange.previous, locationChange.current)) { setOpen(false) } - }, [locationChange]) + }, [locationChange.change, locationChange.current, locationChange.previous]) return ( <> From e0ea58343248f32ff12e4705ecb15b795dcde6a0 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:03:46 -0400 Subject: [PATCH 12/29] Revert "fix: remove tabindex from VariantItem after component renders" This reverts commit 24474505bb20554d3f494767577ab1104d34fdf8. --- src/components/variant-select.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index 833f669e8d8..bb7ba9ca8e5 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -15,21 +15,8 @@ const StyledOverlay = styled(ActionMenu.Overlay)` ` const VariantItem = ({title, shortName, url, active}) => { - const itemRef = React.useRef(null) - - React.useEffect(() => { - // Remove tabindex after the component renders - if (itemRef.current) { - const actionListItem = itemRef.current.closest('[role="listitem"]') || itemRef.current - if (actionListItem) { - actionListItem.removeAttribute('tabindex') - actionListItem.removeAttribute('tabIndex') - } - } - }, []) - return ( - + {title} ) From 3f1b461f409609b5ece0a840f2956b8ee6d442c5 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:04:41 -0400 Subject: [PATCH 13/29] test commit --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index bb7ba9ca8e5..f01d99cf4fe 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -11,7 +11,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` border-color: var(--borderColor-default, #d0d7de); border-width: 1px; border-style: solid; - box-shadow: var(--shadow-resting-medium, 0 3px 6px rgba(140, 149, 159, 0.15)); + box-shadow: var(--shadow-resting-medium, 0 3px 7px rgba(140, 149, 159, 0.15)); ` const VariantItem = ({title, shortName, url, active}) => { From 0e119195e0fa9adbb8585846a0496aa80a5e7957 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:09:40 -0400 Subject: [PATCH 14/29] fix: simplify dependency array in VariantMenu useEffect --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index f01d99cf4fe..ed51685b70d 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -45,7 +45,7 @@ const VariantMenu = ({title, latest, current, prerelease, legacy}) => { if (locationChange.change && getNav.didVariantChange(locationChange.previous, locationChange.current)) { setOpen(false) } - }, [locationChange.change, locationChange.current, locationChange.previous]) + }, [locationChange]) return ( <> From 65699afd61d880e983b52c4c99cd6d3751c6f541 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:12:54 -0400 Subject: [PATCH 15/29] Revert "test commit" This reverts commit 3f1b461f409609b5ece0a840f2956b8ee6d442c5. --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index ed51685b70d..1bb4b50e90f 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -11,7 +11,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` border-color: var(--borderColor-default, #d0d7de); border-width: 1px; border-style: solid; - box-shadow: var(--shadow-resting-medium, 0 3px 7px rgba(140, 149, 159, 0.15)); + box-shadow: var(--shadow-resting-medium, 0 3px 6px rgba(140, 149, 159, 0.15)); ` const VariantItem = ({title, shortName, url, active}) => { From 642ed134e38f4de985a8f47ea5a863f7747af7f4 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:17:11 -0400 Subject: [PATCH 16/29] Revert "fix: simplify dependency array in VariantMenu useEffect" This reverts commit 0e119195e0fa9adbb8585846a0496aa80a5e7957. --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index 1bb4b50e90f..bb7ba9ca8e5 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -45,7 +45,7 @@ const VariantMenu = ({title, latest, current, prerelease, legacy}) => { if (locationChange.change && getNav.didVariantChange(locationChange.previous, locationChange.current)) { setOpen(false) } - }, [locationChange]) + }, [locationChange.change, locationChange.current, locationChange.previous]) return ( <> From 7c01211c400bc87fcf3b58b583f0f034cea78921 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:17:15 -0400 Subject: [PATCH 17/29] Reapply "test commit" This reverts commit 65699afd61d880e983b52c4c99cd6d3751c6f541. --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index bb7ba9ca8e5..f01d99cf4fe 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -11,7 +11,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` border-color: var(--borderColor-default, #d0d7de); border-width: 1px; border-style: solid; - box-shadow: var(--shadow-resting-medium, 0 3px 6px rgba(140, 149, 159, 0.15)); + box-shadow: var(--shadow-resting-medium, 0 3px 7px rgba(140, 149, 159, 0.15)); ` const VariantItem = ({title, shortName, url, active}) => { From 5829d6b8e83663f520c401209a91bf700b9ceb02 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:18:33 -0400 Subject: [PATCH 18/29] Revert "Reapply "test commit"" This reverts commit 7c01211c400bc87fcf3b58b583f0f034cea78921. --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index f01d99cf4fe..bb7ba9ca8e5 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -11,7 +11,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` border-color: var(--borderColor-default, #d0d7de); border-width: 1px; border-style: solid; - box-shadow: var(--shadow-resting-medium, 0 3px 7px rgba(140, 149, 159, 0.15)); + box-shadow: var(--shadow-resting-medium, 0 3px 6px rgba(140, 149, 159, 0.15)); ` const VariantItem = ({title, shortName, url, active}) => { From 0dca946303f0a2103519708c8262418bd8682136 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:19:13 -0400 Subject: [PATCH 19/29] test commit --- src/components/table-of-contents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/table-of-contents.js b/src/components/table-of-contents.js index ec358a17ef3..74cb097dc23 100644 --- a/src/components/table-of-contents.js +++ b/src/components/table-of-contents.js @@ -81,7 +81,7 @@ export const Desktop = withTableOfContents(({items}) => ( maxHeight: `calc(100vh - ${SCROLL_MARGIN_TOP}px)`, }} > - + Table of contents ( overflowY: 'auto', }} > - + )) From 591d55bf70ff92f7a9ffcd163f97c6080f234351 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Wed, 1 Oct 2025 16:22:17 -0400 Subject: [PATCH 20/29] fix: add tabIndex to VariantItem for accessibility --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index bb7ba9ca8e5..34204e84a37 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -16,7 +16,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` const VariantItem = ({title, shortName, url, active}) => { return ( - + {title} ) From 706796513255cadc20c43e38638e96b0994e06d8 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Fri, 3 Oct 2025 17:10:19 -0400 Subject: [PATCH 21/29] Revert "fix: add tabIndex to VariantItem for accessibility" This reverts commit 591d55bf70ff92f7a9ffcd163f97c6080f234351. --- src/components/variant-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/variant-select.js b/src/components/variant-select.js index 34204e84a37..bb7ba9ca8e5 100644 --- a/src/components/variant-select.js +++ b/src/components/variant-select.js @@ -16,7 +16,7 @@ const StyledOverlay = styled(ActionMenu.Overlay)` const VariantItem = ({title, shortName, url, active}) => { return ( - + {title} ) From d933bae21c27e1e8286c204745aba84e499fdd0a Mon Sep 17 00:00:00 2001 From: jpg619 Date: Fri, 3 Oct 2025 17:10:22 -0400 Subject: [PATCH 22/29] Revert "test commit" This reverts commit 0dca946303f0a2103519708c8262418bd8682136. --- src/components/table-of-contents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/table-of-contents.js b/src/components/table-of-contents.js index 74cb097dc23..ec358a17ef3 100644 --- a/src/components/table-of-contents.js +++ b/src/components/table-of-contents.js @@ -81,7 +81,7 @@ export const Desktop = withTableOfContents(({items}) => ( maxHeight: `calc(100vh - ${SCROLL_MARGIN_TOP}px)`, }} > - + Table of contents ( overflowY: 'auto', }} > - + )) From 581915e6f7fa5d6d1e4162f3f1c488e86d11e1d3 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Mon, 6 Oct 2025 11:52:49 -0400 Subject: [PATCH 23/29] fix: add aria-labelledby attribute to SearchResults for accessibility --- src/components/search.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/search.js b/src/components/search.js index 6dbaa47bd6d..8b46462cf28 100644 --- a/src/components/search.js +++ b/src/components/search.js @@ -44,6 +44,7 @@ const SearchResults = ({results, getItemProps, highlightedIndex}) => { as={LinkNoUnderline} to={item.path} active={highlightedIndex === index} + aria-labelledby={null} > From 62d444650946770f4d235fa2e5cf553a94fc42b5 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Mon, 6 Oct 2025 12:02:48 -0400 Subject: [PATCH 24/29] fix: add aria-posinset and aria-setsize attributes to SearchResults for improved accessibility --- src/components/search.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/search.js b/src/components/search.js index 8b46462cf28..7b879983524 100644 --- a/src/components/search.js +++ b/src/components/search.js @@ -44,7 +44,8 @@ const SearchResults = ({results, getItemProps, highlightedIndex}) => { as={LinkNoUnderline} to={item.path} active={highlightedIndex === index} - aria-labelledby={null} + aria-posinset={index + 1} + aria-setsize={results.length} > From 0e60f290777201775f05f86a355c3a6bd9ea3096 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Mon, 6 Oct 2025 12:16:28 -0400 Subject: [PATCH 25/29] fix: update aria-label in SearchResults for improved accessibility --- src/components/search.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/search.js b/src/components/search.js index 7b879983524..87e1cc71f2c 100644 --- a/src/components/search.js +++ b/src/components/search.js @@ -44,8 +44,7 @@ const SearchResults = ({results, getItemProps, highlightedIndex}) => { as={LinkNoUnderline} to={item.path} active={highlightedIndex === index} - aria-posinset={index + 1} - aria-setsize={results.length} + aria-label={`${item.title}${hierarchy.length ? ` in ${hierarchy.map(s => s.shortName || s.title).join(' / ')}` : ` in ${siteMetadata.shortName}`}, ${index + 1} of ${results.length}`} > From e5e0042b6eb93690b5c760d0354909f5e03adebf Mon Sep 17 00:00:00 2001 From: jpg619 Date: Mon, 6 Oct 2025 12:26:21 -0400 Subject: [PATCH 26/29] fix: add data-has-description attribute to SearchResults for improved accessibility --- src/components/search.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/search.js b/src/components/search.js index 87e1cc71f2c..84f57d4544b 100644 --- a/src/components/search.js +++ b/src/components/search.js @@ -44,6 +44,7 @@ const SearchResults = ({results, getItemProps, highlightedIndex}) => { as={LinkNoUnderline} to={item.path} active={highlightedIndex === index} + data-has-description="true" aria-label={`${item.title}${hierarchy.length ? ` in ${hierarchy.map(s => s.shortName || s.title).join(' / ')}` : ` in ${siteMetadata.shortName}`}, ${index + 1} of ${results.length}`} > From 74335e47641504ecc19d214ff6c4990817008db1 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Mon, 6 Oct 2025 12:40:03 -0400 Subject: [PATCH 27/29] fix: add aria-label to SearchResults items for improved accessibility --- src/components/search.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/search.js b/src/components/search.js index 84f57d4544b..9a15dd8f14a 100644 --- a/src/components/search.js +++ b/src/components/search.js @@ -44,10 +44,11 @@ const SearchResults = ({results, getItemProps, highlightedIndex}) => { as={LinkNoUnderline} to={item.path} active={highlightedIndex === index} - data-has-description="true" - aria-label={`${item.title}${hierarchy.length ? ` in ${hierarchy.map(s => s.shortName || s.title).join(' / ')}` : ` in ${siteMetadata.shortName}`}, ${index + 1} of ${results.length}`} > - + s.shortName || s.title).join(' / ')}` : ` in ${siteMetadata.shortName}`}, ${index + 1} of ${results.length}`} + > {hierarchy.length ? hierarchy.map(s => s.shortName || s.title).join(' / ') : siteMetadata.shortName} From cc5fce7308ee6b559a9899f3edaeda3c1064c306 Mon Sep 17 00:00:00 2001 From: jpg619 Date: Mon, 6 Oct 2025 13:02:19 -0400 Subject: [PATCH 28/29] fix: add aria-label to NavList.Item for improved accessibility --- src/components/table-of-contents.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/table-of-contents.js b/src/components/table-of-contents.js index ec358a17ef3..9d7597e0919 100644 --- a/src/components/table-of-contents.js +++ b/src/components/table-of-contents.js @@ -8,7 +8,11 @@ const TableOfContentsItems = ({items, depth}) => ( <> {items.map(item => ( - 1 ? 4 : 2}}> + 1 ? 4 : 2}} + aria-label={`${item.title}${depth > 1 ? ` in ${item.title}` : ''} 10 of 200`} + > {item.title} {item.items ? : null} From aa50708986490fd942c55ffba24a0b8f1352554f Mon Sep 17 00:00:00 2001 From: jpg619 Date: Mon, 6 Oct 2025 13:24:03 -0400 Subject: [PATCH 29/29] fix: update aria-label in TableOfContentsItems for improved accessibility --- src/components/table-of-contents.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/table-of-contents.js b/src/components/table-of-contents.js index 9d7597e0919..ed2acb5a77e 100644 --- a/src/components/table-of-contents.js +++ b/src/components/table-of-contents.js @@ -6,16 +6,20 @@ import usePage from '../hooks/use-page' const TableOfContentsItems = ({items, depth}) => ( <> - {items.map(item => ( + {items.map((item, index) => ( 1 ? 4 : 2}} - aria-label={`${item.title}${depth > 1 ? ` in ${item.title}` : ''} 10 of 200`} + aria-label={`${item.title}, ${index + 1} of ${items.length}`} + aria-labelledby={null} > {item.title} + {item.items ? ( + + + + ) : null} - {item.items ? : null} ))}