Skip to content

Commit 206f9e8

Browse files
David LegerTimer
authored andcommitted
Resolved issue facebook#2971 (facebook#2989)
* Resolved issue facebook#2971 - changed h2 to h1 in template to adhere to accessibility guidelines. - Added h1 styles to maintain same font size. * Added header tag to template Corrected templete to use semantically correct header tag for header instead of div * Added className for App-title - Added className="App-title" to h1 tag - Changed CSS selector to target class instead of element
1 parent 0e064b3 commit 206f9e8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/react-scripts/template/src/App.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
color: white;
1515
}
1616

17+
.App-title {
18+
font-size: 1.5em;
19+
}
20+
1721
.App-intro {
1822
font-size: large;
1923
}

packages/react-scripts/template/src/App.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ class App extends Component {
66
render() {
77
return (
88
<div className="App">
9-
<div className="App-header">
9+
<header className="App-header">
1010
<img src={logo} className="App-logo" alt="logo" />
11-
<h2>Welcome to React</h2>
12-
</div>
11+
<h1 className="App-title">Welcome to React</h1>
12+
</header>
1313
<p className="App-intro">
1414
To get started, edit <code>src/App.js</code> and save to reload.
1515
</p>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy