fix(a11y): add h1 heading to classic challenges (#45031)

This commit is contained in:
Bruce B
2022-02-08 07:51:19 -08:00
committed by GitHub
parent d863018dd9
commit 03d9239eb5
3 changed files with 10 additions and 3 deletions

View File

@ -39,9 +39,9 @@ exports[`<ChallengeTitle/> renders correctly 1`] = `
<div <div
className="title-text" className="title-text"
> >
<b> <h1>
title text title text
</b> </h1>
<svg <svg
aria-label="icons.passed" aria-label="icons.passed"
height="50" height="50"

View File

@ -91,6 +91,13 @@
padding: 0px 3px; padding: 0px 3px;
} }
.title-text h1 {
font-size: inherit;
line-height: 1.42857143;
margin: 0;
display: inline;
}
.title-translation-cta { .title-translation-cta {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

View File

@ -39,7 +39,7 @@ function ChallengeTitle({
{showBreadCrumbs && <BreadCrumb block={block} superBlock={superBlock} />} {showBreadCrumbs && <BreadCrumb block={block} superBlock={superBlock} />}
<div className='challenge-title'> <div className='challenge-title'>
<div className='title-text'> <div className='title-text'>
<b>{children}</b> <h1>{children}</h1>
{isCompleted ? ( {isCompleted ? (
<GreenPass <GreenPass
style={{ height: '15px', width: '15px', marginLeft: '7px' }} style={{ height: '15px', width: '15px', marginLeft: '7px' }}