From 202c6a63e6325bd52795f5fc5991c8f9186ddcec Mon Sep 17 00:00:00 2001 From: bmj0053 Date: Sat, 21 Sep 2024 17:04:30 +0900 Subject: [PATCH 1/7] =?UTF-8?q?chore:=20localhost=20=EB=AA=A8=EB=B0=94?= =?UTF-8?q?=EC=9D=BC=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a11y/vite.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/a11y/vite.config.ts b/a11y/vite.config.ts index 9cc50ea..d8d4e6c 100644 --- a/a11y/vite.config.ts +++ b/a11y/vite.config.ts @@ -4,4 +4,7 @@ import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + server: { + host: "0.0.0.0", + }, }); From 1eba9be70dc4b9980a55aaf74eaba3be71fbf6e2 Mon Sep 17 00:00:00 2001 From: bmj0053 Date: Sat, 21 Sep 2024 17:04:46 +0900 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20html=20lang=20=ED=95=9C=EA=B5=AD?= =?UTF-8?q?=EC=96=B4=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a11y/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a11y/index.html b/a11y/index.html index 12fa3e7..73a1d92 100644 --- a/a11y/index.html +++ b/a11y/index.html @@ -1,5 +1,5 @@ - + From 95fe5c2b18a6a50d5ffdeb773b2c6a325929b737 Mon Sep 17 00:00:00 2001 From: bmj0053 Date: Sat, 21 Sep 2024 17:11:31 +0900 Subject: [PATCH 3/7] =?UTF-8?q?feat:=20=EC=8B=9C=EB=A9=98=ED=8B=B1=20?= =?UTF-8?q?=ED=83=9C=EA=B7=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a11y/src/App.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/a11y/src/App.tsx b/a11y/src/App.tsx index a8159f9..299331e 100644 --- a/a11y/src/App.tsx +++ b/a11y/src/App.tsx @@ -1,16 +1,16 @@ -import "./Typography.css"; -import "./App.css"; +import './Typography.css'; +import './App.css'; -import FlightBooking from "./components/FlightBooking"; +import FlightBooking from './components/FlightBooking'; function App() { return (
-
-
+
+
-
-
+ +
); } From cac71d92731e67dd0d8ab626967dda42b9cd93d5 Mon Sep 17 00:00:00 2001 From: bmj0053 Date: Sat, 21 Sep 2024 17:21:28 +0900 Subject: [PATCH 4/7] =?UTF-8?q?feat:=20aria-label=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a11y/src/components/FlightBooking.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/a11y/src/components/FlightBooking.tsx b/a11y/src/components/FlightBooking.tsx index 313cab3..3aef6f4 100644 --- a/a11y/src/components/FlightBooking.tsx +++ b/a11y/src/components/FlightBooking.tsx @@ -1,6 +1,6 @@ -import { useState } from "react"; +import { useState } from 'react'; -import "./FlightBooking.css"; +import './FlightBooking.css'; const MAX_PASSENGERS = 3; @@ -21,11 +21,19 @@ const FlightBooking = () => {
성인
- {adultCount} -
From cc260d2bb16da062bc5282ad9530b6e98f506c23 Mon Sep 17 00:00:00 2001 From: bmj0053 Date: Sat, 21 Sep 2024 17:22:22 +0900 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20aria-live=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a11y/src/components/FlightBooking.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a11y/src/components/FlightBooking.tsx b/a11y/src/components/FlightBooking.tsx index 3aef6f4..c76f7ac 100644 --- a/a11y/src/components/FlightBooking.tsx +++ b/a11y/src/components/FlightBooking.tsx @@ -28,7 +28,7 @@ const FlightBooking = () => { > - - {adultCount} + {adultCount} @@ -32,12 +46,17 @@ const FlightBooking = () => {
+ {adultCountMessage && ( +
+ {adultCountMessage} +
+ )} ); From f2622e00ae6113a9d241b8f7f9fc5713e9984a40 Mon Sep 17 00:00:00 2001 From: bmj0053 Date: Mon, 23 Sep 2024 14:38:53 +0900 Subject: [PATCH 7/7] =?UTF-8?q?fix:=20errorMessage=EA=B0=80=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=EC=97=90=20=EC=95=88=EB=B3=B4=EC=9D=B4=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a11y/src/components/FlightBooking.css | 12 ++++++++++-- a11y/src/components/FlightBooking.tsx | 14 ++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/a11y/src/components/FlightBooking.css b/a11y/src/components/FlightBooking.css index ade5d6a..5235c41 100644 --- a/a11y/src/components/FlightBooking.css +++ b/a11y/src/components/FlightBooking.css @@ -62,6 +62,14 @@ cursor: pointer; } -.counter-msg { - margin-bottom: 1rem; +.visually-hidden { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; } diff --git a/a11y/src/components/FlightBooking.tsx b/a11y/src/components/FlightBooking.tsx index e516def..6416b66 100644 --- a/a11y/src/components/FlightBooking.tsx +++ b/a11y/src/components/FlightBooking.tsx @@ -7,25 +7,23 @@ const MIN_PASSENGERS = 1; const FlightBooking = () => { const [adultCount, setAdultCount] = useState(1); - const [adultCountMessage, setAdultCountMessage] = useState(''); + const [errorMessage, setErrorMessage] = useState(''); const incrementCount = () => { if (adultCount === MAX_PASSENGERS) { - setAdultCountMessage('최대 승객 수에 도달했습니다.'); + setErrorMessage('최대 승객 수에 도달했습니다.'); return; } - setAdultCountMessage(''); setAdultCount((prev) => Math.min(MAX_PASSENGERS, prev + 1)); }; const decrementCount = () => { if (adultCount === MIN_PASSENGERS) { - setAdultCountMessage('최소 승객 수에 도달했습니다.'); + setErrorMessage('최소 승객 수에 도달했습니다.'); return; } - setAdultCountMessage(''); setAdultCount((prev) => Math.max(1, prev - 1)); }; @@ -52,9 +50,9 @@ const FlightBooking = () => { - {adultCountMessage && ( -
- {adultCountMessage} + {errorMessage && ( +
+ {errorMessage}
)}