Skip to content

Commit 4f48e07

Browse files
authored
Merge pull request #8 from topcoder-platform/qa-accessibility
Qa accessibility
2 parents 0726b2e + d2cba86 commit 4f48e07

File tree

82 files changed

+1645
-585
lines changed

Some content is hidden

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

82 files changed

+1645
-585
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: 31 additions & 9 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"
@@ -640,29 +652,38 @@ exports[`Render with specified profile 1`] = `
640652
>
641653
<div
642654
className="src-shared-components-TopcoderHeader-___style__user-menu-handle___r6kbg"
655+
role="button"
643656
style={
644657
Object {
645658
"color": "#555555",
646659
}
647660
}
661+
tabIndex={0}
648662
/>
649-
<div
650-
className="src-shared-components-TopcoderHeader-___style__avatar___3BqbY"
663+
<span
664+
role="link"
665+
tabIndex={0}
651666
>
652-
<ThemedAvatar
653-
composeAdhocTheme="deeply"
654-
composeContextTheme="softly"
655-
mapThemrProps={[Function]}
656-
themePriority="adhoc-context-default"
657-
/>
658-
</div>
667+
<div
668+
className="src-shared-components-TopcoderHeader-___style__avatar___3BqbY"
669+
>
670+
<ThemedAvatar
671+
composeAdhocTheme="deeply"
672+
composeContextTheme="softly"
673+
mapThemrProps={[Function]}
674+
themePriority="adhoc-context-default"
675+
/>
676+
</div>
677+
</span>
659678
</div>
660679
<div
661680
className="opened src-shared-components-TopcoderHeader-___style__search-icon___3w5nA"
662681
data-menu="search"
663682
onMouseEnter={[Function]}
664683
onMouseLeave={[Function]}
665684
onTouchStart={[Function]}
685+
role="button"
686+
tabIndex={0}
666687
>
667688
<MagnifyingGlass
668689
height="18"
@@ -682,6 +703,7 @@ exports[`Render with specified profile 1`] = `
682703
<div
683704
className="opened src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
684705
onMouseLeave={[Function]}
706+
role="search"
685707
>
686708
<input
687709
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__/DateRangePicker.jsx.snap

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exports[`Matches shallow shapshot 1`] = `
1818
endDatePlaceholderText="End Date"
1919
firstDayOfWeek={null}
2020
focusedInput={null}
21-
hideKeyboardShortcutsPanel={true}
21+
hideKeyboardShortcutsPanel={false}
2222
horizontalMargin={0}
2323
initialVisibleMonth={null}
2424
inputIconPosition="before"
@@ -46,6 +46,7 @@ exports[`Matches shallow shapshot 1`] = `
4646
"calendarLabel": "Calendar",
4747
"chooseAvailableEndDate": [Function],
4848
"chooseAvailableStartDate": [Function],
49+
"clearDate": "Clear Date",
4950
"clearDates": "Clear Dates",
5051
"closeDatePicker": "Close",
5152
"dateIsSelected": [Function],
@@ -57,8 +58,8 @@ exports[`Matches shallow shapshot 1`] = `
5758
"focusStartDate": "Interact with the calendar and add the check-in date for your trip.",
5859
"hideKeyboardShortcutsPanel": "Close the shortcuts panel.",
5960
"homeEnd": "Home and end keys",
60-
"jumpToNextMonth": "Move forward to switch to the next month.",
61-
"jumpToPrevMonth": "Move backward to switch to the previous month.",
61+
"jumpToNextMonth": "Next Month",
62+
"jumpToPrevMonth": "Previous Month",
6263
"keyboardNavigationInstructions": "Press the down arrow key to interact with the calendar and
6364
select a date. Press the question mark key to get the keyboard shortcuts for changing dates.",
6465
"keyboardShortcuts": "Keyboard Shortcuts",

0 commit comments

Comments
 (0)