Skip to content

Commit 9997a3a

Browse files
committed
Merge branch 'qa-accessibility' of https://github.com/topcoder-platform/community-app into qa-access-2824
2 parents 0f59730 + 02bec8a commit 9997a3a

File tree

91 files changed

+417
-320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+417
-320
lines changed

.eslintrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"extends": "./node_modules/topcoder-react-utils/config/eslint/default.json",
33
"rules": {
44
"jsx-a11y/anchor-is-valid": false,
5-
"import/no-cycle": [2, { "maxDepth": 1 }],
6-
"react/prop-types": ["error", { "ignore": ["challenge","eventDetails","winner","bucket","theme","submissionObject","profile","communitiesList","meta","scoreboard","item","activeTrigger","menuItems","scoreboard"] }]
5+
"import/no-cycle": [2, { "maxDepth": 1 }]
76
},
87
"env": {
98
"browser": true

__tests__/shared/__snapshots__/index.jsx.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ exports[`Snapshot match 1`] = `
55
<HelmetWrapper
66
defer={true}
77
encodeSpecialCharacters={true}
8+
htmlAttributes={
9+
Object {
10+
"lang": "en",
11+
}
12+
}
813
>
914
<meta
1015
content="#FFFFFF"
@@ -34,6 +39,11 @@ exports[`Snapshot match 2`] = `
3439
<HelmetWrapper
3540
defer={true}
3641
encodeSpecialCharacters={true}
42+
htmlAttributes={
43+
Object {
44+
"lang": "en",
45+
}
46+
}
3747
>
3848
<meta
3949
content="#FFFFFF"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exports[`renders a skill correctly 1`] = `
55
className="src-shared-components-ProfilePage-Skill-___styles__container___bW089"
66
>
77
<div
8+
aria-label="Test Skill Icon"
89
className="src-shared-components-ProfilePage-Skill-___styles__skill-icon___1-d49"
910
>
1011
<FallbackIcon

__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__/Auth.jsx.snap

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
exports[`Snapshot match 1`] = `
44
<div
55
className="src-shared-components-TopcoderHeader-Auth-___style__auth___3X0_r"
6-
onClick={[Function]}
7-
onKeyPress={null}
8-
role="button"
9-
tabIndex="0"
106
>
117
<a
128
className="tc-btn-sm tc-btn-primary"
@@ -27,10 +23,6 @@ exports[`Snapshot match 1`] = `
2723
exports[`Snapshot match 2`] = `
2824
<div
2925
className="column src-shared-components-TopcoderHeader-Auth-___style__auth___3X0_r"
30-
onClick={[Function]}
31-
onKeyPress={null}
32-
role="button"
33-
tabIndex="0"
3426
>
3527
<a
3628
className="tc-btn-sm tc-btn-primary"

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

Lines changed: 15 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"
@@ -81,6 +83,8 @@ exports[`Default render 1`] = `
8183
onMouseEnter={[Function]}
8284
onMouseLeave={[Function]}
8385
onTouchStart={[Function]}
86+
role="button"
87+
tabIndex={0}
8488
>
8589
<MagnifyingGlass
8690
height="18"
@@ -100,6 +104,7 @@ exports[`Default render 1`] = `
100104
<div
101105
className="src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
102106
onMouseLeave={[Function]}
107+
role="search"
103108
>
104109
<input
105110
onKeyPress={[Function]}
@@ -280,6 +285,7 @@ exports[`Render with open menu 1`] = `
280285
<div
281286
className="src-shared-components-TopcoderHeader-___style__header___LwYWf"
282287
onMouseLeave={[Function]}
288+
role="banner"
283289
>
284290
<div
285291
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
@@ -298,6 +304,7 @@ exports[`Render with open menu 1`] = `
298304
</a>
299305
<ul
300306
className="src-shared-components-TopcoderHeader-___style__main-menu___1pz4L"
307+
role="navigation"
301308
>
302309
<li
303310
className="src-shared-components-TopcoderHeader-___style__main-menu-item___2KIu6 src-shared-components-TopcoderHeader-___style__opened___1WPVI src-shared-components-TopcoderHeader-___style__current___1Hk7o"
@@ -357,6 +364,8 @@ exports[`Render with open menu 1`] = `
357364
onMouseEnter={[Function]}
358365
onMouseLeave={[Function]}
359366
onTouchStart={[Function]}
367+
role="button"
368+
tabIndex={0}
360369
>
361370
<MagnifyingGlass
362371
height="18"
@@ -387,6 +396,7 @@ exports[`Render with open menu 1`] = `
387396
<div
388397
className="src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
389398
onMouseLeave={[Function]}
399+
role="search"
390400
>
391401
<input
392402
onKeyPress={[Function]}
@@ -567,6 +577,7 @@ exports[`Render with specified profile 1`] = `
567577
<div
568578
className="src-shared-components-TopcoderHeader-___style__header___LwYWf"
569579
onMouseLeave={[Function]}
580+
role="banner"
570581
>
571582
<div
572583
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
@@ -585,6 +596,7 @@ exports[`Render with specified profile 1`] = `
585596
</a>
586597
<ul
587598
className="src-shared-components-TopcoderHeader-___style__main-menu___1pz4L"
599+
role="navigation"
588600
>
589601
<li
590602
className="src-shared-components-TopcoderHeader-___style__main-menu-item___2KIu6"
@@ -663,6 +675,8 @@ exports[`Render with specified profile 1`] = `
663675
onMouseEnter={[Function]}
664676
onMouseLeave={[Function]}
665677
onTouchStart={[Function]}
678+
role="button"
679+
tabIndex={0}
666680
>
667681
<MagnifyingGlass
668682
height="18"
@@ -682,6 +696,7 @@ exports[`Render with specified profile 1`] = `
682696
<div
683697
className="opened src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
684698
onMouseLeave={[Function]}
699+
role="search"
685700
>
686701
<input
687702
onKeyPress={[Function]}

__tests__/shared/components/TopcoderHeader/desktop/SubMenu/Item.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test('Matches shallow shapshot', () => {
88
renderer.render((
99
<Item
1010
currentSubMenuTitle="title"
11-
icon="icon url"
11+
icon={<div />}
1212
title="title"
1313
link="menu url"
1414
/>
@@ -18,7 +18,7 @@ test('Matches shallow shapshot', () => {
1818
renderer.render((
1919
<Item
2020
currentSubMenuTitle="another title"
21-
icon="icon url"
21+
icon={<div />}
2222
title="title"
2323
link="menu url"
2424
/>

__tests__/shared/components/TopcoderHeader/desktop/SubMenu/__snapshots__/Item.jsx.snap

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ exports[`Matches shallow shapshot 1`] = `
1111
openNewTab={false}
1212
to="menu url"
1313
>
14-
icon url
14+
<div
15+
aria-label="title"
16+
/>
1517
title
1618
</Link>
1719
</li>
@@ -28,7 +30,9 @@ exports[`Matches shallow shapshot 2`] = `
2830
openNewTab={false}
2931
to="menu url"
3032
>
31-
icon url
33+
<div
34+
aria-label="title"
35+
/>
3236
title
3337
</Link>
3438
</li>

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

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,61 @@
33
exports[`Matches shallow shapshot 1`] = `
44
<div
55
className="src-shared-components-TopcoderFooter-___style__footer___28yQ6"
6+
role="contentinfo"
67
>
7-
<nav>
8-
<ul>
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-
</ul>
55-
</nav>
51+
TERMS
52+
</a>
53+
</li>
54+
</ol>
5655
<div
5756
className="src-shared-components-TopcoderFooter-___style__social-links___2G4Ia"
5857
>
5958
<hr />
6059
<a
60+
aria-label="Facebook"
6161
href="https://www.facebook.com/topcoder"
6262
target="fbwindow"
6363
>
@@ -78,6 +78,7 @@ exports[`Matches shallow shapshot 1`] = `
7878
</svg>
7979
</a>
8080
<a
81+
aria-label="Twitter"
8182
href="http://www.twitter.com/topcoder"
8283
target="twwindow"
8384
>
@@ -98,6 +99,7 @@ exports[`Matches shallow shapshot 1`] = `
9899
</svg>
99100
</a>
100101
<a
102+
aria-label="Linkedin"
101103
href="https://www.linkedin.com/company/topcoder"
102104
target="liwindow"
103105
>
@@ -118,6 +120,7 @@ exports[`Matches shallow shapshot 1`] = `
118120
</svg>
119121
</a>
120122
<a
123+
aria-label="Instagram"
121124
href="https://www.instagram.com/topcoder"
122125
target="inwindow"
123126
>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ exports[`Matches shallow shapshot shapshot 2`] = `
108108
/>
109109
<span>
110110
<span
111+
aria-checked={false}
112+
aria-label="Filter"
111113
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filter-switch-with-label___21Ups"
114+
role="switch"
112115
>
113116
<ThemedSwitchWithLabel
114117
composeAdhocTheme="deeply"
@@ -122,7 +125,10 @@ exports[`Matches shallow shapshot shapshot 2`] = `
122125
/>
123126
</span>
124127
<span
128+
aria-checked={false}
129+
aria-label="Filter"
125130
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filter-switch-with-label___21Ups"
131+
role="switch"
126132
>
127133
<ThemedSwitchWithLabel
128134
composeAdhocTheme="deeply"
@@ -136,7 +142,10 @@ exports[`Matches shallow shapshot shapshot 2`] = `
136142
/>
137143
</span>
138144
<span
145+
aria-checked={false}
146+
aria-label="Filter"
139147
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filter-switch-with-label___21Ups"
148+
role="switch"
140149
>
141150
<ThemedSwitchWithLabel
142151
composeAdhocTheme="deeply"

__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]}

0 commit comments

Comments
 (0)