From ecacccb9f2d2174696c16536e769cf8b4d2cd077 Mon Sep 17 00:00:00 2001 From: Akanshu Singh Date: Fri, 17 Jan 2025 13:25:08 +0530 Subject: [PATCH 1/2] fix: Adds ariaLabel attribute to navigation block --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/navigation/block.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 820f0afccc2b57..443bbdce325b39 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -473,7 +473,7 @@ A collection of blocks that allow visitors to get around your site. ([Source](ht - **Category:** theme - **Allowed Blocks:** core/navigation-link, core/search, core/social-links, core/page-list, core/spacer, core/home-link, core/site-title, core/site-logo, core/navigation-submenu, core/loginout, core/buttons - **Supports:** align (full, wide), ariaLabel, inserter, interactivity, layout (allowSizingOnChildren, default, ~~allowInheriting~~, ~~allowSwitching~~, ~~allowVerticalAlignment~~), spacing (blockGap, units), typography (fontSize, lineHeight), ~~html~~, ~~renaming~~ -- **Attributes:** __unstableLocation, backgroundColor, customBackgroundColor, customOverlayBackgroundColor, customOverlayTextColor, customTextColor, hasIcon, icon, maxNestingLevel, openSubmenusOnClick, overlayBackgroundColor, overlayMenu, overlayTextColor, ref, rgbBackgroundColor, rgbTextColor, showSubmenuIcon, templateLock, textColor +- **Attributes:** __unstableLocation, ariaLabel, backgroundColor, customBackgroundColor, customOverlayBackgroundColor, customOverlayTextColor, customTextColor, hasIcon, icon, maxNestingLevel, openSubmenusOnClick, overlayBackgroundColor, overlayMenu, overlayTextColor, ref, rgbBackgroundColor, rgbTextColor, showSubmenuIcon, templateLock, textColor ## Custom Link diff --git a/packages/block-library/src/navigation/block.json b/packages/block-library/src/navigation/block.json index c65e0c6224616e..b4e07641e728f9 100644 --- a/packages/block-library/src/navigation/block.json +++ b/packages/block-library/src/navigation/block.json @@ -84,6 +84,10 @@ "templateLock": { "type": [ "string", "boolean" ], "enum": [ "all", "insert", "contentOnly", false ] + }, + "ariaLabel": { + "type": "string", + "default": "" } }, "providesContext": { From 788ce1a398753aa9e2900a15d3c5b3b6a5b47b30 Mon Sep 17 00:00:00 2001 From: Akanshu Singh Date: Fri, 17 Jan 2025 13:49:37 +0530 Subject: [PATCH 2/2] fix: Adds attributes to core__navigation.json file in test folder --- test/integration/fixtures/blocks/core__navigation.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/fixtures/blocks/core__navigation.json b/test/integration/fixtures/blocks/core__navigation.json index 340cdf3fdbe599..9be819ee01daf4 100644 --- a/test/integration/fixtures/blocks/core__navigation.json +++ b/test/integration/fixtures/blocks/core__navigation.json @@ -8,7 +8,8 @@ "overlayMenu": "mobile", "icon": "handle", "hasIcon": true, - "maxNestingLevel": 5 + "maxNestingLevel": 5, + "ariaLabel": "" }, "innerBlocks": [] }