From 3a42f4c7fd00234af76d7c580b56943b281a5e1b Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Thu, 11 Jul 2024 13:51:23 +0200 Subject: [PATCH 1/8] Remove Quote and List block V2 flags (#63347) Co-authored-by: geriux Co-authored-by: dcalhoun --- .../ios/GutenbergDemo/GutenbergViewController.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/react-native-editor/ios/GutenbergDemo/GutenbergViewController.swift b/packages/react-native-editor/ios/GutenbergDemo/GutenbergViewController.swift index 73c7fa5d054fce..c9c1bca191c22e 100644 --- a/packages/react-native-editor/ios/GutenbergDemo/GutenbergViewController.swift +++ b/packages/react-native-editor/ios/GutenbergDemo/GutenbergViewController.swift @@ -370,8 +370,6 @@ extension GutenbergViewController: GutenbergWebDelegate { extension GutenbergViewController: GutenbergBridgeDataSource { class EditorSettings: GutenbergEditorSettings { var isFSETheme: Bool = true - var quoteBlockV2: Bool = true - var listBlockV2: Bool = true var rawStyles: String? = nil var rawFeatures: String? = nil var colors: [[String: String]]? = nil From 48aa7d5eaa1429eec654c16d9e2bd71defd9a426 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Thu, 11 Jul 2024 21:17:30 +0900 Subject: [PATCH 2/8] Button: Never apply `aria-disabled` to anchor (#63376) * Button: Never apply `aria-disabled` to anchor * Add changelog Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: DaniGuardiola Co-authored-by: tyxla Co-authored-by: ciampo Co-authored-by: afercia --- packages/components/CHANGELOG.md | 4 ++++ packages/components/src/button/index.tsx | 2 +- packages/components/src/button/test/index.tsx | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index e92926bbbe5cec..a9416b25c5ff05 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Bug Fixes + +- `Button`: Never apply `aria-disabled` to anchor ([#63376](https://github.com/WordPress/gutenberg/pull/63376)). + ### Internal - `CustomSelectControl`: switch to ariakit-based implementation ([#63258](https://github.com/WordPress/gutenberg/pull/63258)). diff --git a/packages/components/src/button/index.tsx b/packages/components/src/button/index.tsx index ac495007838403..f49baff60233f6 100644 --- a/packages/components/src/button/index.tsx +++ b/packages/components/src/button/index.tsx @@ -162,7 +162,7 @@ export function UnforwardedButton( } ); const trulyDisabled = disabled && ! accessibleWhenDisabled; - const Tag = href !== undefined && ! trulyDisabled ? 'a' : 'button'; + const Tag = href !== undefined && ! disabled ? 'a' : 'button'; const buttonProps: ComponentPropsWithoutRef< 'button' > = Tag === 'button' ? { diff --git a/packages/components/src/button/test/index.tsx b/packages/components/src/button/test/index.tsx index 02fe6ecb851c4b..df359eff7cced8 100644 --- a/packages/components/src/button/test/index.tsx +++ b/packages/components/src/button/test/index.tsx @@ -542,6 +542,19 @@ describe( 'Button', () => { expect( screen.getByRole( 'button' ) ).toBeVisible(); } ); + + it( 'should become a button again when disabled is supplied, even with `accessibleWhenDisabled`', () => { + render( +