Skip to content

Commit 163de15

Browse files
authored
- Adding alt text to images in the react courses (#905)
* - Adding alt text to images in the react courses
1 parent e46e41e commit 163de15

File tree

59 files changed

+60
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+60
-60
lines changed

exercises/react-vite/02-setting-up-your-environment/02-solution/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from "react"
22
import reactLogo from "./assets/react.svg"
33
import viteLogo from "./assets/vite.svg"
4-
import "./App.css"
4+
import "./index.css"
55

66
function App() {
77
const [count, setCount] = useState(0)

exercises/react-vite/02-setting-up-your-environment/03-solution/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from "react"
22
import reactLogo from "./assets/react.svg"
33
import viteLogo from "./assets/vite.svg"
4-
import "./App.css"
4+
import "./index.css"
55

66
function App() {
77
const [count, setCount] = useState(0)

exercises/react-vite/03-intro-to-jsx/01-solution/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const App: React.FC = () => {
55
<h2 className="page-header">Restaurants</h2>
66
<div className="restaurant">
77
<img
8-
alt=""
8+
alt="A thumbnail for Poutine Palace"
99
src="/node_modules/place-my-order-assets/images/4-thumbnail.jpg"
1010
width="100"
1111
height="100"

exercises/react-vite/03-intro-to-jsx/02-problem/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const App: React.FC = () => {
4141
<h2 className="page-header">Restaurants</h2>
4242
<div className="restaurant">
4343
<img
44-
alt=""
44+
alt="A thumbnail for Restaurants"
4545
src="/node_modules/place-my-order-assets/images/4-thumbnail.jpg"
4646
width="100"
4747
height="100"

exercises/react-vite/03-intro-to-jsx/02-solution/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const App: React.FC = () => {
4242
{restaurants.data ? (
4343
restaurants.data.map(({ _id, address, images, name, slug }) => (
4444
<div key={_id} className="restaurant">
45-
<img src={images.thumbnail} alt="" width="100" height="100" />
45+
<img src={images.thumbnail} alt={`A thumbnail for ${name}`} width="100" height="100" />
4646
<h3>{name}</h3>
4747

4848
{address && (

exercises/react-vite/04-components/01-problem/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const App: React.FC = () => {
4343
{restaurants.data ? (
4444
restaurants.data.map(({ _id, address, images, name, slug }) => (
4545
<div key={_id} className="restaurant">
46-
<img src={images.thumbnail} alt="" width="100" height="100" />
46+
<img src={images.thumbnail} alt={`A thumbnail for ${name}`} width="100" height="100" />
4747
<h3>{name}</h3>
4848

4949
{address && (

exercises/react-vite/04-components/01-solution/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import RestaurantList from "./pages/RestaurantList"
2-
import "./App.css"
2+
import "./index.css"
33

44
const App: React.FC = () => {
55
return (

exercises/react-vite/04-components/01-solution/src/pages/RestaurantList/RestaurantList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const RestaurantList: React.FC = () => {
4242
{restaurants.data ? (
4343
restaurants.data.map(({ _id, address, images, name, slug }) => (
4444
<div key={_id} className="restaurant">
45-
<img src={images.thumbnail} alt="" width="100" height="100" />
45+
<img src={images.thumbnail} alt={`A thumbnail for ${name}`} width="100" height="100" />
4646
<h3>{name}</h3>
4747

4848
{address && (

exercises/react-vite/05-props/01-problem/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import RestaurantList from "./pages/RestaurantList"
2-
import "./App.css"
2+
import "./index.css"
33

44
const App: React.FC = () => {
55
return (

exercises/react-vite/05-props/01-problem/src/pages/RestaurantList/RestaurantList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const RestaurantList: React.FC = () => {
4343
{restaurants.data ? (
4444
restaurants.data.map(({ _id, address, images, name, slug }) => (
4545
<div key={_id} className="restaurant">
46-
<img src={images.thumbnail} alt="" width="100" height="100" />
46+
<img src={images.thumbnail} alt={`A thumbnail for ${name}`} width="100" height="100" />
4747
<h3>{name}</h3>
4848

4949
{address && (

0 commit comments

Comments
 (0)