From b37f671c41dc795aa79ded65a3ffba5c557e871a Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Tue, 19 Nov 2024 11:51:28 -0300 Subject: [PATCH 01/10] feat(ActionRequirement): improve accessibility --- .../yoga/src/ActionRequirement/web/ActionRequirement.jsx | 8 ++++---- .../src/ActionRequirement/web/ActionRequirementStyles.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx index e0c28a3475..7384d8c677 100644 --- a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx +++ b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx @@ -73,15 +73,15 @@ function ActionRequirement(props) { defineCompoundComponents(); return ( - {illustration && {illustration}} + {illustration && } {titleAsTextDisplay ? ( - {title} + {title} ) : ( - {title} + {title} )} - + {description} {list && {list}} diff --git a/packages/yoga/src/ActionRequirement/web/ActionRequirementStyles.js b/packages/yoga/src/ActionRequirement/web/ActionRequirementStyles.js index b571133224..a98a19ea3a 100644 --- a/packages/yoga/src/ActionRequirement/web/ActionRequirementStyles.js +++ b/packages/yoga/src/ActionRequirement/web/ActionRequirementStyles.js @@ -5,7 +5,7 @@ import Box from '../../Box'; import Button from '../../Button'; export const Title = styled(Text.H4).attrs({ - as: 'p', + as: 'h1', bold: true, })` ${({ From 434fcaf2c2778ceab2fdcbda8191404b13b19fb7 Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Tue, 19 Nov 2024 17:00:14 -0300 Subject: [PATCH 02/10] refactor: removes unnecessary tabIndex --- .../web/ActionRequirement.jsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx index 7384d8c677..99b6bca143 100644 --- a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx +++ b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx @@ -73,15 +73,25 @@ function ActionRequirement(props) { defineCompoundComponents(); return ( - {illustration && } + {illustration && + ( + + ) + } {titleAsTextDisplay ? ( - {title} + + {title} + ) : ( - {title} + + {title} + )} - + {description} {list && {list}} From 020859a88382265e375c53fc4083b4352b7a9257 Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Tue, 19 Nov 2024 17:09:50 -0300 Subject: [PATCH 03/10] refactor: adjust code formatting --- .../ActionRequirement/web/ActionRequirement.jsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx index 99b6bca143..db94d936e8 100644 --- a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx +++ b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx @@ -73,13 +73,10 @@ function ActionRequirement(props) { defineCompoundComponents(); return ( - {illustration && - ( - - ) - } + {illustration && ( + + )} + {titleAsTextDisplay ? ( @@ -87,9 +84,7 @@ function ActionRequirement(props) { {title} ) : ( - - {title} - + {title} )} {description} From 55b225da9f1cfe976e1a0c7472fb8a29857bf2e1 Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Tue, 19 Nov 2024 17:13:50 -0300 Subject: [PATCH 04/10] refactor: adjust code formatting --- packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx index db94d936e8..5764890daa 100644 --- a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx +++ b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx @@ -73,9 +73,9 @@ function ActionRequirement(props) { defineCompoundComponents(); return ( - {illustration && ( + {illustration && ( - )} + )} From c236e46676b32f8ab41818714b45d8355b5db5c7 Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Tue, 19 Nov 2024 17:16:53 -0300 Subject: [PATCH 05/10] Update packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com> --- packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx index 5764890daa..5834c2ac5f 100644 --- a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx +++ b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx @@ -74,7 +74,7 @@ function ActionRequirement(props) { return ( {illustration && ( - + )} From 31e96478687cefcc763d7b6bf590d5c839242df7 Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Tue, 19 Nov 2024 17:21:39 -0300 Subject: [PATCH 06/10] refactor: adjust code formatting --- packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx index 5834c2ac5f..090114c6a8 100644 --- a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx +++ b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx @@ -76,8 +76,6 @@ function ActionRequirement(props) { {illustration && ( )} - - {titleAsTextDisplay ? ( From 9112deeac3095de59e45f9a68690f0de0a9d26ab Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Tue, 19 Nov 2024 17:35:43 -0300 Subject: [PATCH 07/10] test: update snapshot --- .../ActionRequirement.test.jsx.snap | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/yoga/src/ActionRequirement/web/__snapshots__/ActionRequirement.test.jsx.snap b/packages/yoga/src/ActionRequirement/web/__snapshots__/ActionRequirement.test.jsx.snap index fdf009fea5..e9f8e635c6 100644 --- a/packages/yoga/src/ActionRequirement/web/__snapshots__/ActionRequirement.test.jsx.snap +++ b/packages/yoga/src/ActionRequirement/web/__snapshots__/ActionRequirement.test.jsx.snap @@ -112,12 +112,14 @@ exports[` should default match snapshot 1`] = `
-

title -

+

@@ -271,12 +273,14 @@ exports[` should match snapshot with list 1`] = `

-

title -

+

@@ -418,12 +422,14 @@ exports[` should match snapshot with text display 1`] = `

-

title -

+

From 5c46039d92128d9a04bb1658ad92a558a133c9b5 Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Mon, 25 Nov 2024 13:38:22 -0300 Subject: [PATCH 08/10] refactor: adjust lint --- packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx index 090114c6a8..99177c4765 100644 --- a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx +++ b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx @@ -74,7 +74,7 @@ function ActionRequirement(props) { return ( {illustration && ( - + {illustration} )} {titleAsTextDisplay ? ( From d33cfd9b838a8d82f35343ed8e78a6d846f0d05f Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Mon, 25 Nov 2024 13:41:52 -0300 Subject: [PATCH 09/10] refactor: removes unnecessary aria-label --- .../yoga/src/ActionRequirement/web/ActionRequirement.jsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx index 99177c4765..9e4836bca7 100644 --- a/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx +++ b/packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx @@ -78,13 +78,11 @@ function ActionRequirement(props) { )} {titleAsTextDisplay ? ( - - {title} - + {title} ) : ( - {title} + {title} )} - + {description} {list && {list}} From d1ad094888e0295d6166d03ef075c09f58fa6917 Mon Sep 17 00:00:00 2001 From: Marcos Ricardo Date: Mon, 25 Nov 2024 13:44:47 -0300 Subject: [PATCH 10/10] test: update snapshots --- .../web/__snapshots__/ActionRequirement.test.jsx.snap | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/yoga/src/ActionRequirement/web/__snapshots__/ActionRequirement.test.jsx.snap b/packages/yoga/src/ActionRequirement/web/__snapshots__/ActionRequirement.test.jsx.snap index e9f8e635c6..d74e47ea34 100644 --- a/packages/yoga/src/ActionRequirement/web/__snapshots__/ActionRequirement.test.jsx.snap +++ b/packages/yoga/src/ActionRequirement/web/__snapshots__/ActionRequirement.test.jsx.snap @@ -113,13 +113,11 @@ exports[` should default match snapshot 1`] = ` class="c1" >

title

@@ -274,13 +272,11 @@ exports[` should match snapshot with list 1`] = ` class="c1" >

title

@@ -423,13 +419,11 @@ exports[` should match snapshot with text display 1`] = ` class="c1" >

title