@@ -6,6 +6,7 @@ import { createSelector } from 'reselect';
66import { certificatesByNameSelector } from '../../../redux/selectors' ;
77import type { CurrentCert } from '../../../redux/prop-types' ;
88import { FullWidthRow , Spacer , ButtonLink } from '../../helpers' ;
9+ import './certifications.css' ;
910
1011const mapStateToProps = (
1112 state : Record < string , unknown > ,
@@ -45,7 +46,7 @@ interface CertButtonProps {
4546function CertButton ( { username, cert } : CertButtonProps ) : JSX . Element {
4647 const { t } = useTranslation ( ) ;
4748 return (
48- < >
49+ < li >
4950 < ButtonLink
5051 block
5152 size = 'large'
@@ -56,7 +57,7 @@ function CertButton({ username, cert }: CertButtonProps): JSX.Element {
5657 } ) }
5758 </ ButtonLink >
5859 < Spacer size = 'small' />
59- </ >
60+ </ li >
6061 ) ;
6162}
6263
@@ -69,36 +70,45 @@ function Certificates({
6970} : CertificationProps ) : JSX . Element {
7071 const { t } = useTranslation ( ) ;
7172 return (
72- < FullWidthRow className = 'certifications' >
73- < h2 > { t ( 'profile.fcc-certs' ) } </ h2 >
73+ < FullWidthRow className = 'profile- certifications' >
74+ < h2 id = 'fcc-certifications' > { t ( 'profile.fcc-certs' ) } </ h2 >
7475 < br />
7576 { hasModernCert && currentCerts ? (
76- currentCerts
77- . filter ( ( { show } ) => show )
78- . map ( cert => (
79- < CertButton key = { cert . certSlug } cert = { cert } username = { username } />
80- ) )
77+ < ul aria-labelledby = 'fcc-certifications' >
78+ { currentCerts
79+ . filter ( ( { show } ) => show )
80+ . map ( cert => (
81+ < CertButton key = { cert . certSlug } cert = { cert } username = { username } />
82+ ) ) }
83+ </ ul >
8184 ) : (
8285 < p className = 'text-center' > { t ( 'profile.no-certs' ) } </ p >
8386 ) }
84- { hasLegacyCert ? (
87+ { hasLegacyCert && (
8588 < div >
8689 < Spacer size = 'medium' />
87- < h3 > { t ( 'settings.headings.legacy-certs' ) } </ h3 >
88- < Spacer size = 'medium' />
89- { legacyCerts &&
90- legacyCerts
91- . filter ( ( { show } ) => show )
92- . map ( cert => (
93- < CertButton
94- key = { cert . certSlug }
95- cert = { cert }
96- username = { username }
97- />
98- ) ) }
90+ < h3 id = 'legacy-certifications' >
91+ { t ( 'settings.headings.legacy-certs' ) }
92+ </ h3 >
9993 < Spacer size = 'medium' />
94+ { legacyCerts && (
95+ < >
96+ < ul aria-labelledby = 'legacy-certifications' >
97+ { legacyCerts
98+ . filter ( ( { show } ) => show )
99+ . map ( cert => (
100+ < CertButton
101+ key = { cert . certSlug }
102+ cert = { cert }
103+ username = { username }
104+ />
105+ ) ) }
106+ </ ul >
107+ < Spacer size = 'medium' />
108+ </ >
109+ ) }
100110 </ div >
101- ) : null }
111+ ) }
102112 < hr />
103113 </ FullWidthRow >
104114 ) ;
0 commit comments