Skip to content

2864 #2992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 26, 2019
Merged

2864 #2992

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`renders a full Profile correctly 1`] = `
>
<div
className="src-shared-components-ProfilePage-___styles__profile-container___13E1W"
role="main"
>
<div
className="src-shared-components-ProfilePage-___styles__about-container___3Bxx5"
Expand Down Expand Up @@ -619,6 +620,7 @@ exports[`renders an empty Profile correctly 1`] = `
>
<div
className="src-shared-components-ProfilePage-___styles__profile-container___13E1W"
role="main"
>
<div
className="src-shared-components-ProfilePage-___styles__about-container___3Bxx5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`Default render 1`] = `
<div
className="src-shared-components-TopcoderHeader-___style__header___LwYWf"
onMouseLeave={[Function]}
role="banner"
>
<div
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
Expand All @@ -22,6 +23,7 @@ exports[`Default render 1`] = `
</a>
<ul
className="src-shared-components-TopcoderHeader-___style__main-menu___1pz4L"
role="navigation"
>
<li
className="src-shared-components-TopcoderHeader-___style__main-menu-item___2KIu6"
Expand Down Expand Up @@ -100,6 +102,7 @@ exports[`Default render 1`] = `
<div
className="src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
onMouseLeave={[Function]}
role="search"
>
<input
onKeyPress={[Function]}
Expand Down Expand Up @@ -280,6 +283,7 @@ exports[`Render with open menu 1`] = `
<div
className="src-shared-components-TopcoderHeader-___style__header___LwYWf"
onMouseLeave={[Function]}
role="banner"
>
<div
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
Expand All @@ -298,6 +302,7 @@ exports[`Render with open menu 1`] = `
</a>
<ul
className="src-shared-components-TopcoderHeader-___style__main-menu___1pz4L"
role="navigation"
>
<li
className="src-shared-components-TopcoderHeader-___style__main-menu-item___2KIu6 src-shared-components-TopcoderHeader-___style__opened___1WPVI src-shared-components-TopcoderHeader-___style__current___1Hk7o"
Expand Down Expand Up @@ -387,6 +392,7 @@ exports[`Render with open menu 1`] = `
<div
className="src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
onMouseLeave={[Function]}
role="search"
>
<input
onKeyPress={[Function]}
Expand Down Expand Up @@ -567,6 +573,7 @@ exports[`Render with specified profile 1`] = `
<div
className="src-shared-components-TopcoderHeader-___style__header___LwYWf"
onMouseLeave={[Function]}
role="banner"
>
<div
className="src-shared-components-TopcoderHeader-___style__main-desktop-header___oqm_l"
Expand All @@ -585,6 +592,7 @@ exports[`Render with specified profile 1`] = `
</a>
<ul
className="src-shared-components-TopcoderHeader-___style__main-menu___1pz4L"
role="navigation"
>
<li
className="src-shared-components-TopcoderHeader-___style__main-menu-item___2KIu6"
Expand Down Expand Up @@ -682,6 +690,7 @@ exports[`Render with specified profile 1`] = `
<div
className="opened src-shared-components-TopcoderHeader-___style__search-field___2VMzu"
onMouseLeave={[Function]}
role="search"
>
<input
onKeyPress={[Function]}
Expand Down
87 changes: 43 additions & 44 deletions __tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,55 @@
exports[`Matches shallow shapshot 1`] = `
<div
className="src-shared-components-TopcoderFooter-___style__footer___28yQ6"
role="contentinfo"
>
<nav>
<ol>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
<ol>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
>
<a
href="https://www.topcoder-dev.com/community/about"
>
<a
href="https://www.topcoder-dev.com/community/about"
>
ABOUT US
</a>
</li>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
ABOUT US
</a>
</li>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
>
<a
href="https://www.topcoder-dev.com/community/contact"
>
<a
href="https://www.topcoder-dev.com/community/contact"
>
CONTACT US
</a>
</li>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
CONTACT US
</a>
</li>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
>
<a
href="https://help.topcoder-dev.com"
>
<a
href="https://help.topcoder-dev.com"
>
HELP CENTER
</a>
</li>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
HELP CENTER
</a>
</li>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
>
<a
href="https://www.topcoder-dev.com/community/how-it-works/privacy-policy/"
>
<a
href="https://www.topcoder-dev.com/community/how-it-works/privacy-policy/"
>
PRIVACY POLICY
</a>
</li>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
PRIVACY POLICY
</a>
</li>
<li
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
>
<a
href="https://www.topcoder-dev.com/community/how-it-works/terms/"
>
<a
href="https://www.topcoder-dev.com/community/how-it-works/terms/"
>
TERMS
</a>
</li>
</ol>
</nav>
TERMS
</a>
</li>
</ol>
<div
className="src-shared-components-TopcoderFooter-___style__social-links___2G4Ia"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`Matches shallow shapshot 1`] = `
<div
className="src-shared-components-challenge-listing-Filters-ChallengeSearchBar-___style__ChallengeSearchBar___fvE3o"
role="search"
>
<input
onChange={[Function]}
Expand Down Expand Up @@ -30,6 +31,7 @@ exports[`Matches shallow shapshot 1`] = `
exports[`Matches shallow shapshot 2`] = `
<div
className="src-shared-components-challenge-listing-Filters-ChallengeSearchBar-___style__ChallengeSearchBar___fvE3o"
role="search"
>
<input
onChange={[Function]}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/Dashboard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function Dashboard({
}) {
return (
<div styleName="container">
<div styleName="page">
<div styleName="page" role="main">
<Header
achievements={achievements}
achievementsLoading={achievementsLoading}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/ProfilePage/Stats/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ProfileStats extends React.Component {
}

return (
<div styleName="profile-subtrack-container">
<div styleName="profile-subtrack-container" role="main">
<div styleName="content">
<div styleName="page-state-header">
<header>
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/ProfilePage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class ProfilePage extends React.Component {
/>
)
}
<div styleName="profile-container">
<div styleName="profile-container" role="main">
<div styleName="about-container">
<div styleName="profile-header-container">
<Sticky
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const ReviewOpportunityDetailsPage = ({
toggleRole,
}) => (
<div styleName="outer-container">
<div styleName="page">
<div styleName="page" role="main">

<div styleName="header">
<h1 styleName="challenge-title">
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/SubmissionPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function SubmissionsPage(props) {

return (
<div styleName="container">
<div styleName="content">
<div styleName="content" role="main">
<Header
challengeId={challengeId}
challengesUrl={challengesUrl}
Expand Down
28 changes: 13 additions & 15 deletions src/shared/components/TopcoderFooter/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,24 @@ export default function TopcoderFooter() {
const base = config.URL.BASE;
const currentYear = moment().year();
return (
<div styleName="footer">
<nav>
<ol>
<Link to={`${base}/community/about`}>
<div styleName="footer" role="contentinfo">
<ol>
<Link to={`${base}/community/about`}>
ABOUT US
</Link>
<Link to={`${base}/community/contact`}>
</Link>
<Link to={`${base}/community/contact`}>
CONTACT US
</Link>
<Link to={config.URL.HELP}>
</Link>
<Link to={config.URL.HELP}>
HELP CENTER
</Link>
<Link to={`${base}/community/how-it-works/privacy-policy/`}>
</Link>
<Link to={`${base}/community/how-it-works/privacy-policy/`}>
PRIVACY POLICY
</Link>
<Link to={`${base}/community/how-it-works/terms/`}>
</Link>
<Link to={`${base}/community/how-it-works/terms/`}>
TERMS
</Link>
</ol>
</nav>
</Link>
</ol>
<div styleName="social-links">
<hr />
<a href="https://www.facebook.com/topcoder" target="fbwindow" aria-label="Facebook">
Expand Down
4 changes: 3 additions & 1 deletion src/shared/components/TopcoderHeader/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ export default class TopcoderHeader extends React.Component {
return (
<div
styleName="header"
role="banner"
ref={(div) => { this.headerRoot = div; }}
onMouseLeave={() => {
if (openedMenu) {
Expand All @@ -351,7 +352,7 @@ export default class TopcoderHeader extends React.Component {
<a href={BASE_URL} styleName="logo" aria-label="Topcoder Homepage">
<LogoTopcoderWithName height={53} width={135} />
</a>
<ul styleName="main-menu" ref={(ul) => { this.mainMenu = ul; }}>
<ul styleName="main-menu" role="navigation" ref={(ul) => { this.mainMenu = ul; }}>
{mainMenu}
</ul>
<div styleName="right-menu">
Expand Down Expand Up @@ -387,6 +388,7 @@ export default class TopcoderHeader extends React.Component {
trigger={activeTrigger}
/>
<div
role="search"
className={searchOpened ? 'opened' : ''}
onMouseLeave={(event) => {
/* False when cursor leaves from the sub-menu to the element that has
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function ChallengeSearchBar({
setQuery,
}) {
return (
<div styleName="ChallengeSearchBar">
<div styleName="ChallengeSearchBar" role="search">
<input
onChange={event => setQuery(event.target.value)}
onKeyPress={event => (event.key === 'Enter' ? onSearch(query.trim()) : null)}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/containers/SubmissionManagement/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class SubmissionManagementPageContainer extends React.Component {

return (
<div styleName="outer-container">
<div styleName="submission-management-container">
<div styleName="submission-management-container" role="main">
{!isEmpty
&& (
<SubmissionManagement
Expand Down
2 changes: 1 addition & 1 deletion src/shared/containers/challenge-detail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class ChallengeDetailPageContainer extends React.Component {

return (
<div styleName="outer-container">
<div styleName="challenge-detail-container">
<div styleName="challenge-detail-container" role="main">
{ Boolean(isEmpty) && (
<div styleName="page">
Challenge #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export class ListingContainer extends React.Component {
}

return (
<div styleName="container">
<div styleName="container" role="main">
<MetaTags
description={description}
image={ogImage}
Expand Down