Skip to content

Commit 33e77ce

Browse files
authored
Merge pull request #2992 from afrisalyp/2864
2864
2 parents 452964f + db22689 commit 33e77ce

File tree

15 files changed

+81
-69
lines changed

15 files changed

+81
-69
lines changed

__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ exports[`renders a full Profile correctly 1`] = `
66
>
77
<div
88
className="src-shared-components-ProfilePage-___styles__profile-container___13E1W"
9+
role="main"
910
>
1011
<div
1112
className="src-shared-components-ProfilePage-___styles__about-container___3Bxx5"
@@ -619,6 +620,7 @@ exports[`renders an empty Profile correctly 1`] = `
619620
>
620621
<div
621622
className="src-shared-components-ProfilePage-___styles__profile-container___13E1W"
623+
role="main"
622624
>
623625
<div
624626
className="src-shared-components-ProfilePage-___styles__about-container___3Bxx5"

__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ exports[`Default render 1`] = `
44
<div
55
className="src-shared-components-TopcoderHeader-___style__header___LwYWf"
66
onMouseLeave={[Function]}
7+
role="banner"
78
>
89
<div
910
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
@@ -22,6 +23,7 @@ exports[`Default render 1`] = `
2223
</a>
2324
<ul
2425
className="src-shared-components-TopcoderHeader-___style__main-menu___1pz4L"
26+
role="navigation"
2527
>
2628
<li
2729
className="src-shared-components-TopcoderHeader-___style__main-menu-item___2KIu6"
@@ -100,6 +102,7 @@ exports[`Default render 1`] = `
100102
<div
101103
className="src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
102104
onMouseLeave={[Function]}
105+
role="search"
103106
>
104107
<input
105108
onKeyPress={[Function]}
@@ -280,6 +283,7 @@ exports[`Render with open menu 1`] = `
280283
<div
281284
className="src-shared-components-TopcoderHeader-___style__header___LwYWf"
282285
onMouseLeave={[Function]}
286+
role="banner"
283287
>
284288
<div
285289
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
@@ -298,6 +302,7 @@ exports[`Render with open menu 1`] = `
298302
</a>
299303
<ul
300304
className="src-shared-components-TopcoderHeader-___style__main-menu___1pz4L"
305+
role="navigation"
301306
>
302307
<li
303308
className="src-shared-components-TopcoderHeader-___style__main-menu-item___2KIu6 src-shared-components-TopcoderHeader-___style__opened___1WPVI src-shared-components-TopcoderHeader-___style__current___1Hk7o"
@@ -387,6 +392,7 @@ exports[`Render with open menu 1`] = `
387392
<div
388393
className="src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
389394
onMouseLeave={[Function]}
395+
role="search"
390396
>
391397
<input
392398
onKeyPress={[Function]}
@@ -567,6 +573,7 @@ exports[`Render with specified profile 1`] = `
567573
<div
568574
className="src-shared-components-TopcoderHeader-___style__header___LwYWf"
569575
onMouseLeave={[Function]}
576+
role="banner"
570577
>
571578
<div
572579
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
@@ -585,6 +592,7 @@ exports[`Render with specified profile 1`] = `
585592
</a>
586593
<ul
587594
className="src-shared-components-TopcoderHeader-___style__main-menu___1pz4L"
595+
role="navigation"
588596
>
589597
<li
590598
className="src-shared-components-TopcoderHeader-___style__main-menu-item___2KIu6"
@@ -682,6 +690,7 @@ exports[`Render with specified profile 1`] = `
682690
<div
683691
className="opened src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
684692
onMouseLeave={[Function]}
693+
role="search"
685694
>
686695
<input
687696
onKeyPress={[Function]}

__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,55 @@
33
exports[`Matches shallow shapshot 1`] = `
44
<div
55
className="src-shared-components-TopcoderFooter-___style__footer___28yQ6"
6+
role="contentinfo"
67
>
7-
<nav>
8-
<ol>
9-
<li
10-
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
8+
<ol>
9+
<li
10+
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
11+
>
12+
<a
13+
href="https://www.topcoder-dev.com/community/about"
1114
>
12-
<a
13-
href="https://www.topcoder-dev.com/community/about"
14-
>
15-
ABOUT US
16-
</a>
17-
</li>
18-
<li
19-
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
15+
ABOUT US
16+
</a>
17+
</li>
18+
<li
19+
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
20+
>
21+
<a
22+
href="https://www.topcoder-dev.com/community/contact"
2023
>
21-
<a
22-
href="https://www.topcoder-dev.com/community/contact"
23-
>
24-
CONTACT US
25-
</a>
26-
</li>
27-
<li
28-
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
24+
CONTACT US
25+
</a>
26+
</li>
27+
<li
28+
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
29+
>
30+
<a
31+
href="https://help.topcoder-dev.com"
2932
>
30-
<a
31-
href="https://help.topcoder-dev.com"
32-
>
33-
HELP CENTER
34-
</a>
35-
</li>
36-
<li
37-
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
33+
HELP CENTER
34+
</a>
35+
</li>
36+
<li
37+
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
38+
>
39+
<a
40+
href="https://www.topcoder-dev.com/community/how-it-works/privacy-policy/"
3841
>
39-
<a
40-
href="https://www.topcoder-dev.com/community/how-it-works/privacy-policy/"
41-
>
42-
PRIVACY POLICY
43-
</a>
44-
</li>
45-
<li
46-
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
42+
PRIVACY POLICY
43+
</a>
44+
</li>
45+
<li
46+
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
47+
>
48+
<a
49+
href="https://www.topcoder-dev.com/community/how-it-works/terms/"
4750
>
48-
<a
49-
href="https://www.topcoder-dev.com/community/how-it-works/terms/"
50-
>
51-
TERMS
52-
</a>
53-
</li>
54-
</ol>
55-
</nav>
51+
TERMS
52+
</a>
53+
</li>
54+
</ol>
5655
<div
5756
className="src-shared-components-TopcoderFooter-___style__social-links___2G4Ia"
5857
>

__tests__/shared/components/challenge-listing/Filters/__snapshots__/ChallengeSearchBar.jsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
exports[`Matches shallow shapshot 1`] = `
44
<div
55
className="src-shared-components-challenge-listing-Filters-ChallengeSearchBar-___style__ChallengeSearchBar___fvE3o"
6+
role="search"
67
>
78
<input
89
onChange={[Function]}
@@ -30,6 +31,7 @@ exports[`Matches shallow shapshot 1`] = `
3031
exports[`Matches shallow shapshot 2`] = `
3132
<div
3233
className="src-shared-components-challenge-listing-Filters-ChallengeSearchBar-___style__ChallengeSearchBar___fvE3o"
34+
role="search"
3335
>
3436
<input
3537
onChange={[Function]}

src/shared/components/Dashboard/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function Dashboard({
4444
}) {
4545
return (
4646
<div styleName="container">
47-
<div styleName="page">
47+
<div styleName="page" role="main">
4848
<Header
4949
achievements={achievements}
5050
achievementsLoading={achievementsLoading}

src/shared/components/ProfilePage/Stats/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class ProfileStats extends React.Component {
8080
}
8181

8282
return (
83-
<div styleName="profile-subtrack-container">
83+
<div styleName="profile-subtrack-container" role="main">
8484
<div styleName="content">
8585
<div styleName="page-state-header">
8686
<header>

src/shared/components/ProfilePage/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class ProfilePage extends React.Component {
167167
/>
168168
)
169169
}
170-
<div styleName="profile-container">
170+
<div styleName="profile-container" role="main">
171171
<div styleName="about-container">
172172
<div styleName="profile-header-container">
173173
<Sticky

src/shared/components/ReviewOpportunityDetailsPage/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const ReviewOpportunityDetailsPage = ({
3838
toggleRole,
3939
}) => (
4040
<div styleName="outer-container">
41-
<div styleName="page">
41+
<div styleName="page" role="main">
4242

4343
<div styleName="header">
4444
<h1 styleName="challenge-title">

src/shared/components/SubmissionPage/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function SubmissionsPage(props) {
4040

4141
return (
4242
<div styleName="container">
43-
<div styleName="content">
43+
<div styleName="content" role="main">
4444
<Header
4545
challengeId={challengeId}
4646
challengesUrl={challengesUrl}

src/shared/components/TopcoderFooter/index.jsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,24 @@ export default function TopcoderFooter() {
3333
const base = config.URL.BASE;
3434
const currentYear = moment().year();
3535
return (
36-
<div styleName="footer">
37-
<nav>
38-
<ol>
39-
<Link to={`${base}/community/about`}>
36+
<div styleName="footer" role="contentinfo">
37+
<ol>
38+
<Link to={`${base}/community/about`}>
4039
ABOUT US
41-
</Link>
42-
<Link to={`${base}/community/contact`}>
40+
</Link>
41+
<Link to={`${base}/community/contact`}>
4342
CONTACT US
44-
</Link>
45-
<Link to={config.URL.HELP}>
43+
</Link>
44+
<Link to={config.URL.HELP}>
4645
HELP CENTER
47-
</Link>
48-
<Link to={`${base}/community/how-it-works/privacy-policy/`}>
46+
</Link>
47+
<Link to={`${base}/community/how-it-works/privacy-policy/`}>
4948
PRIVACY POLICY
50-
</Link>
51-
<Link to={`${base}/community/how-it-works/terms/`}>
49+
</Link>
50+
<Link to={`${base}/community/how-it-works/terms/`}>
5251
TERMS
53-
</Link>
54-
</ol>
55-
</nav>
52+
</Link>
53+
</ol>
5654
<div styleName="social-links">
5755
<hr />
5856
<a href="https://www.facebook.com/topcoder" target="fbwindow" aria-label="Facebook">

src/shared/components/TopcoderHeader/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ export default class TopcoderHeader extends React.Component {
337337
return (
338338
<div
339339
styleName="header"
340+
role="banner"
340341
ref={(div) => { this.headerRoot = div; }}
341342
onMouseLeave={() => {
342343
if (openedMenu) {
@@ -351,7 +352,7 @@ export default class TopcoderHeader extends React.Component {
351352
<a href={BASE_URL} styleName="logo" aria-label="Topcoder Homepage">
352353
<LogoTopcoderWithName height={53} width={135} />
353354
</a>
354-
<ul styleName="main-menu" ref={(ul) => { this.mainMenu = ul; }}>
355+
<ul styleName="main-menu" role="navigation" ref={(ul) => { this.mainMenu = ul; }}>
355356
{mainMenu}
356357
</ul>
357358
<div styleName="right-menu">
@@ -387,6 +388,7 @@ export default class TopcoderHeader extends React.Component {
387388
trigger={activeTrigger}
388389
/>
389390
<div
391+
role="search"
390392
className={searchOpened ? 'opened' : ''}
391393
onMouseLeave={(event) => {
392394
/* False when cursor leaves from the sub-menu to the element that has

src/shared/components/challenge-listing/Filters/ChallengeSearchBar/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function ChallengeSearchBar({
2424
setQuery,
2525
}) {
2626
return (
27-
<div styleName="ChallengeSearchBar">
27+
<div styleName="ChallengeSearchBar" role="search">
2828
<input
2929
onChange={event => setQuery(event.target.value)}
3030
onKeyPress={event => (event.key === 'Enter' ? onSearch(query.trim()) : null)}

src/shared/containers/SubmissionManagement/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class SubmissionManagementPageContainer extends React.Component {
8181

8282
return (
8383
<div styleName="outer-container">
84-
<div styleName="submission-management-container">
84+
<div styleName="submission-management-container" role="main">
8585
{!isEmpty
8686
&& (
8787
<SubmissionManagement

src/shared/containers/challenge-detail/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ class ChallengeDetailPageContainer extends React.Component {
284284

285285
return (
286286
<div styleName="outer-container">
287-
<div styleName="challenge-detail-container">
287+
<div styleName="challenge-detail-container" role="main">
288288
{ Boolean(isEmpty) && (
289289
<div styleName="page">
290290
Challenge #

src/shared/containers/challenge-listing/Listing/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export class ListingContainer extends React.Component {
237237
}
238238

239239
return (
240-
<div styleName="container">
240+
<div styleName="container" role="main">
241241
<MetaTags
242242
description={description}
243243
image={ogImage}

0 commit comments

Comments
 (0)