Skip to content

Commit 0649fb1

Browse files
Merge pull request #11 from topcoder-platform/qa-accessibility
Qa accessibility
2 parents 3b47e81 + a00f0de commit 0649fb1

File tree

66 files changed

+1540
-541
lines changed

Some content is hidden

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

66 files changed

+1540
-541
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/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: 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: 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]}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ exports[`Matches shallow shapshot 1`] = `
8484
options={
8585
Array [
8686
Object {
87-
"label": <div>
87+
"data": <div>
8888
Sample community
8989
</div>,
90+
"label": "Sample community",
9091
"name": "Sample community",
9192
"value": "123",
9293
},
@@ -299,9 +300,10 @@ exports[`Matches shallow shapshot 2`] = `
299300
options={
300301
Array [
301302
Object {
302-
"label": <div>
303+
"data": <div>
303304
Sample community
304305
</div>,
306+
"label": "Sample community",
305307
"name": "Sample community",
306308
"value": "123",
307309
},

0 commit comments

Comments
 (0)