Skip to content

Commit 894e448

Browse files
authored
Merge pull request #3156 from topcoder-platform/develop
merge to master
2 parents 045936b + 662177f commit 894e448

File tree

20 files changed

+97
-54
lines changed

20 files changed

+97
-54
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ exports[`Default render 1`] = `
99
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
1010
>
1111
<a
12+
aria-label="Topcoder Homepage"
1213
className="src-shared-components-TopcoderHeader-___style__logo___2WLJ0"
1314
href="https://www.topcoder-dev.com"
1415
>
@@ -286,6 +287,7 @@ exports[`Render with open menu 1`] = `
286287
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
287288
>
288289
<a
290+
aria-label="Topcoder Homepage"
289291
className="src-shared-components-TopcoderHeader-___style__logo___2WLJ0"
290292
href="https://www.topcoder-dev.com"
291293
>
@@ -574,6 +576,7 @@ exports[`Render with specified profile 1`] = `
574576
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
575577
>
576578
<a
579+
aria-label="Topcoder Homepage"
577580
className="src-shared-components-TopcoderHeader-___style__logo___2WLJ0"
578581
href="https://www.topcoder-dev.com"
579582
>

__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",

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ exports[`Matches shallow shapshot 1`] = `
6060
},
6161
]
6262
}
63+
placeholder="Select Keywords"
6364
selectRef={[Function]}
6465
simpleValue={true}
6566
value={null}
@@ -131,6 +132,7 @@ exports[`Matches shallow shapshot 1`] = `
131132
},
132133
]
133134
}
135+
placeholder="Select Subtrack"
134136
selectRef={[Function]}
135137
simpleValue={true}
136138
value={null}
@@ -276,6 +278,7 @@ exports[`Matches shallow shapshot 2`] = `
276278
multi={true}
277279
onChange={[Function]}
278280
options={Array []}
281+
placeholder="Select Keywords"
279282
selectRef={[Function]}
280283
simpleValue={true}
281284
value={null}
@@ -336,6 +339,7 @@ exports[`Matches shallow shapshot 2`] = `
336339
multi={true}
337340
onChange={[Function]}
338341
options={Array []}
342+
placeholder="Select Subtrack"
339343
selectRef={[Function]}
340344
simpleValue={true}
341345
value={null}

src/client/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
* the page by Topcoder accounts-app. */
44
#tc-accounts-iframe {
55
border: none;
6-
display: block;
6+
display: none;
77
}
88
}

src/shared/components/SubmissionPage/FilestackFilePicker/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Uploading:
301301
}).then(file => this.onSuccess(file, path));
302302
return undefined;
303303
}}
304-
role="button"
304+
role="tab"
305305
styleName="drop-zone-mask"
306306
tabIndex={0}
307307
aria-label="Select file to upload"

src/shared/components/SubmissionPage/Submit/index.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,15 @@ Please follow the instructions on the Challenge Details page regarding
316316
<input
317317
type="checkbox"
318318
id="agree"
319+
aria-label="I understand and agree"
319320
onChange={e => setAgreed(e.target.checked)}
320321
/>
321322
<label htmlFor="agree">
322-
<div styleName="tc-checkbox-label">
323-
I UNDERSTAND AND AGREE
324-
</div>
325323
<input type="hidden" />
326324
</label>
325+
<div styleName="tc-checkbox-label">
326+
I UNDERSTAND AND AGREE
327+
</div>
327328
</div>
328329
<PrimaryButton
329330
type="submit"

src/shared/components/SubmissionPage/Submit/styles.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646

4747
a {
48-
color: #1f7be7;
48+
color: $tc-dark-blue-110;
4949
cursor: pointer;
5050
}
5151

@@ -163,7 +163,7 @@
163163
}
164164

165165
a {
166-
color: #1a85ff;
166+
color: $tc-dark-blue-110;
167167
}
168168

169169
.tc-checkbox-label {
@@ -187,7 +187,12 @@
187187
margin-bottom: 30px;
188188

189189
input[type=checkbox] {
190-
display: none;
190+
visibility: visible;
191+
position: absolute;
192+
opacity: 0;
193+
cursor: pointer;
194+
height: 0;
195+
width: 0;
191196
}
192197

193198
label {
@@ -230,6 +235,10 @@
230235
border-color: $tc-dark-blue;
231236
}
232237

238+
input[type=checkbox]:focus ~ label {
239+
outline: 2px auto $tc-dark-blue;
240+
}
241+
233242
input[type=checkbox]:checked + label::after {
234243
opacity: 1;
235244
border-color: $tc-white;

src/shared/components/TopcoderFooter/style.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
text-align: center;
55
font-family: "Roboto", Helvetica, Arial, sans-serif;
66
font-size: 12px;
7-
color: $tc-gray-60;
8-
color: $tc-gray-40;
97
color: $tc-gray-30;
108
}
119

src/shared/components/TopcoderHeader/Auth/style.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
}
2727

2828
.tc-btn-default {
29-
border: 1px solid $tc-dark-blue;
30-
color: $tc-dark-blue;
29+
border: 1px solid $tc-dark-blue-110;
30+
color: $tc-dark-blue-110;
3131

3232
&:hover {
33-
background: $tc-dark-blue;
33+
background: $tc-dark-blue-110;
3434
color: $tc-white;
3535
}
3636
}

src/shared/components/TopcoderHeader/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ export default class TopcoderHeader extends React.Component {
348348
}}
349349
>
350350
<div styleName="main-desktop-header">
351-
<a href={BASE_URL} styleName="logo">
351+
<a href={BASE_URL} styleName="logo" aria-label="Topcoder Homepage">
352352
<LogoTopcoderWithName height={53} width={135} />
353353
</a>
354354
<ul styleName="main-menu" ref={(ul) => { this.mainMenu = ul; }}>

src/shared/components/TopcoderHeader/mobile/Header/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function Header({
2525
styleName="header"
2626
tabIndex={0}
2727
>
28-
{<LogoTopcoder styleName="logo" />}
28+
{<span aria-label="Topcoder Homepage" role="banner"><LogoTopcoder styleName="logo" /></span>}
2929
<div styleName="menu">
3030
Menu
3131
</div>

src/shared/components/challenge-detail/Header/DeadlinesPanel/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function DeadlinesPanel({ deadlines }) {
1616
const started = moment(start).isBefore(moment());
1717

1818
return (
19-
<div styleName="panel">
19+
<div styleName="panel" tabIndex="0" role="tabpanel">
2020
<p styleName="timezone">
2121
Timezone:
2222
{moment.tz.guess()}

src/shared/components/challenge-detail/Header/TabSelector/index.jsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ export default function ChallengeViewSelector(props) {
7373
<div styleName="mask right" />
7474
<div styleName="challenge-view-selector">
7575
<a
76+
tabIndex="0"
77+
role="tab"
78+
aria-selected={selectedView === DETAIL_TABS.DETAILS}
7679
onClick={(e) => { handleSelectorClicked(e, DETAIL_TABS.DETAILS); }}
7780
onKeyPress={(e) => { handleSelectorClicked(e, DETAIL_TABS.DETAILS); }}
7881
styleName={getSelectorStyle(selectedView, DETAIL_TABS.DETAILS)}
@@ -82,6 +85,9 @@ DETAILS
8285
{
8386
numRegistrants ? (
8487
<a
88+
tabIndex="0"
89+
role="tab"
90+
aria-selected={selectedView === DETAIL_TABS.REGISTRANTS}
8591
onClick={(e) => {
8692
handleSelectorClicked(e, DETAIL_TABS.REGISTRANTS);
8793
}}
@@ -100,6 +106,9 @@ REGISTRANTS (
100106
trackLower === 'design' && checkpointCount > 0
101107
&& (
102108
<a
109+
tabIndex="0"
110+
role="tab"
111+
aria-selected={selectedView === DETAIL_TABS.CHECKPOINTS}
103112
onClick={(e) => { handleSelectorClicked(e, DETAIL_TABS.CHECKPOINTS); }}
104113
onKeyPress={(e) => { handleSelectorClicked(e, DETAIL_TABS.CHECKPOINTS); }}
105114
styleName={getSelectorStyle(selectedView, DETAIL_TABS.CHECKPOINTS)}
@@ -113,6 +122,9 @@ CHECKPOINTS (
113122
{
114123
numSubmissions ? (
115124
<a
125+
tabIndex="0"
126+
role="tab"
127+
aria-selected={selectedView === DETAIL_TABS.SUBMISSIONS}
116128
onClick={(e) => { handleSelectorClicked(e, DETAIL_TABS.SUBMISSIONS); }}
117129
onKeyPress={(e) => { handleSelectorClicked(e, DETAIL_TABS.SUBMISSIONS); }}
118130
styleName={getSelectorStyle(selectedView, DETAIL_TABS.SUBMISSIONS)}
@@ -126,6 +138,9 @@ SUBMISSIONS (
126138
{
127139
numWinners ? (
128140
<a
141+
tabIndex="0"
142+
role="tab"
143+
aria-selected={selectedView === DETAIL_TABS.WINNERS}
129144
onClick={(e) => { handleSelectorClicked(e, DETAIL_TABS.WINNERS); }}
130145
onKeyPress={(e) => { handleSelectorClicked(e, DETAIL_TABS.WINNERS); }}
131146
styleName={getSelectorStyle(selectedView, DETAIL_TABS.WINNERS)}

src/shared/components/challenge-detail/Header/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ export default function ChallengeHeader(props) {
261261
</div>
262262
<div styleName="prizes-ops-container">
263263
<div styleName="prizes-outer-container">
264-
<h3 styleName="prizes-title">
264+
<h2 styleName="prizes-title">
265265
PRIZES
266-
</h3>
266+
</h2>
267267
<Prizes prizes={prizes && prizes.length ? prizes : [0]} pointPrizes={pointPrizes} />
268268
{
269269
bonusType ? (

src/shared/components/challenge-detail/Specification/SideBar/ShareSocial.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default class ShareSocial extends React.Component {
3535
<a
3636
className="addthis_button_facebook"
3737
title="Facebook"
38+
aria-label="Share via Facebook"
3839
href="#"
3940
>
4041
<div styleName="facebook-icon">
@@ -46,13 +47,15 @@ f
4647
<a
4748
className="addthis_button_twitter"
4849
title="Twitter"
50+
aria-label="Share via Twitter"
4951
href="#"
5052
>
5153
<TwitterIcon />
5254
</a>
5355
<a
5456
className="addthis_button_print"
5557
title="Print"
58+
aria-label="Print this challenge"
5659
href="#"
5760
>
5861
<PrintIcon />
@@ -61,13 +64,15 @@ f
6164
className="addthis_button_email"
6265
target="_blank"
6366
title="Email"
67+
aria-label="Email this challenge"
6468
href="#"
6569
>
6670
<EmailIcon />
6771
</a>
6872
<a
6973
className="addthis_button_compact"
7074
href="#"
75+
aria-label="More sharing options"
7176
>
7277
<MoreIcon />
7378
</a>

0 commit comments

Comments
 (0)