From 99f7b2c9dffd1379c9b0770eeacd558f1908167f Mon Sep 17 00:00:00 2001 From: Bruce Lai Date: Wed, 16 Feb 2022 20:32:07 -0800 Subject: [PATCH] Set hierarchical header levels (#1101) * Set aria-level values in multiple pages * Some code formatting --- src/components/ContributorThumbnail.js | 3 +- src/components/FAQCard/accordionSection.js | 4 +- src/components/FAQCard/index.js | 2 +- src/components/PictureCard.js | 61 +++++++++++++++---- src/components/TitleSection.js | 2 +- src/pages/Collaborate/LeftTextRightImage.js | 7 ++- src/pages/Collaborate/RightTextLeftImage.js | 7 ++- .../Contributors/UnaffiliatedOrganizations.js | 2 +- src/pages/Donate/index.js | 17 +++++- src/pages/Home/index.js | 2 +- .../Home/sections/TrendingTopicsSection.js | 4 +- src/pages/Share/MediaInfo.js | 6 +- src/pages/Share/index.js | 21 ++++++- src/pages/TagGenerator/StepComponent.js | 4 +- src/pages/TagGenerator/TopicTagSection.js | 2 +- 15 files changed, 113 insertions(+), 31 deletions(-) diff --git a/src/components/ContributorThumbnail.js b/src/components/ContributorThumbnail.js index a2a2a557..dc9281ca 100644 --- a/src/components/ContributorThumbnail.js +++ b/src/components/ContributorThumbnail.js @@ -243,7 +243,8 @@ const Thumbnail = ({ { data-cy='faq-question' expandIcon={} > - {faq.question} + + {faq.question} + diff --git a/src/components/FAQCard/index.js b/src/components/FAQCard/index.js index adaa7539..cc79d340 100644 --- a/src/components/FAQCard/index.js +++ b/src/components/FAQCard/index.js @@ -37,7 +37,7 @@ const FAQCard = (props) => { - + {props.title} diff --git a/src/components/PictureCard.js b/src/components/PictureCard.js index cc1d4797..97a46956 100644 --- a/src/components/PictureCard.js +++ b/src/components/PictureCard.js @@ -58,26 +58,65 @@ export default function PictureCard(props) { return ( <> - + - - + + {items[0].alt} - - {items[0].children} + + + {items[0].children} + - + {items[1].alt} - - {items[1].children} + + + {items[1].children} + - + {items[2].alt} - - {items[2].children} + + + {items[2].children} + diff --git a/src/components/TitleSection.js b/src/components/TitleSection.js index 58040b9a..3d3122e3 100644 --- a/src/components/TitleSection.js +++ b/src/components/TitleSection.js @@ -33,7 +33,7 @@ const TitleSection = (props) => { - + {title} diff --git a/src/pages/Collaborate/LeftTextRightImage.js b/src/pages/Collaborate/LeftTextRightImage.js index 633b588b..04547ecc 100644 --- a/src/pages/Collaborate/LeftTextRightImage.js +++ b/src/pages/Collaborate/LeftTextRightImage.js @@ -102,12 +102,17 @@ const LeftTextRightImage = ({ return ( - + {' '} {mainHeading}{' '} diff --git a/src/pages/Collaborate/RightTextLeftImage.js b/src/pages/Collaborate/RightTextLeftImage.js index 2d59b920..5047dcc3 100644 --- a/src/pages/Collaborate/RightTextLeftImage.js +++ b/src/pages/Collaborate/RightTextLeftImage.js @@ -100,12 +100,17 @@ const RightImageLeftText = ({ /> - + {' '} {mainHeading}{' '} diff --git a/src/pages/Contributors/UnaffiliatedOrganizations.js b/src/pages/Contributors/UnaffiliatedOrganizations.js index 8c1fed51..eb901f55 100644 --- a/src/pages/Contributors/UnaffiliatedOrganizations.js +++ b/src/pages/Contributors/UnaffiliatedOrganizations.js @@ -63,7 +63,7 @@ export const UnaffiliatedOrganizations = (props) => { return ( - + Unaffiliated Organizations {' '} diff --git a/src/pages/Donate/index.js b/src/pages/Donate/index.js index b09f1432..abc1def5 100644 --- a/src/pages/Donate/index.js +++ b/src/pages/Donate/index.js @@ -29,13 +29,20 @@ const Donate = () => { - + The Civic Tech Index is being developed by Hack For LA, and is currently taking donations through Code For America. 1. Please follow this link to the Code For America{' '} - + donation form . @@ -44,7 +51,11 @@ const Donate = () => { 2. To make a donation to the Civic Tech Index, please select{' '} Hack for LA under the brigades listed. - + We appreciate your contribution. diff --git a/src/pages/Home/index.js b/src/pages/Home/index.js index d52424c2..25d64546 100644 --- a/src/pages/Home/index.js +++ b/src/pages/Home/index.js @@ -101,7 +101,7 @@ const Home = () => { justify='center' className={classes.localTitleSectionStyle}> - + Join a worldwide movement to catalog every open-source civic tech project. diff --git a/src/pages/Home/sections/TrendingTopicsSection.js b/src/pages/Home/sections/TrendingTopicsSection.js index 09e5da97..befc8b78 100644 --- a/src/pages/Home/sections/TrendingTopicsSection.js +++ b/src/pages/Home/sections/TrendingTopicsSection.js @@ -79,10 +79,10 @@ const TrendingTopicsSection = () => { return ( - + How are people using the CTI? - + Trending Topics: diff --git a/src/pages/Share/MediaInfo.js b/src/pages/Share/MediaInfo.js index 951dc1da..83dc9357 100644 --- a/src/pages/Share/MediaInfo.js +++ b/src/pages/Share/MediaInfo.js @@ -66,7 +66,11 @@ const MediaInfo = () => { > Use our Logo on your Project! - + If you have done the following: diff --git a/src/pages/Share/index.js b/src/pages/Share/index.js index c7efd913..6bc3f76b 100644 --- a/src/pages/Share/index.js +++ b/src/pages/Share/index.js @@ -23,7 +23,11 @@ const StarMediaSection = () => { - + {cardContent} @@ -59,7 +63,11 @@ const StarMediaSection = () => { - + Don’t forget to star our repository @@ -112,6 +120,7 @@ const SocialMediaSection = () => { > { - + Tell others about us! { const classes = useStyles(); return ( - + {step} - + {stepHeading} diff --git a/src/pages/TagGenerator/TopicTagSection.js b/src/pages/TagGenerator/TopicTagSection.js index 97837366..4173583d 100644 --- a/src/pages/TagGenerator/TopicTagSection.js +++ b/src/pages/TagGenerator/TopicTagSection.js @@ -360,7 +360,7 @@ export const CopyPasteTags = ({ <> - + Here are the Topic Tags to add to {repositoryName}: