Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/pages/auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default function LoginPage() {
{/* ๊ทธ๋ผ๋ฐ์ด์…˜ ์˜์—ญ */}
<div className='relative w-full h-[22vw] min-h-[14rem] max-h-[28rem]'>
<svg
aria-hidden="true"
focusable="false"
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 402 194'
className='absolute inset-0 w-full h-full'
Expand Down
7 changes: 6 additions & 1 deletion src/pages/chatbot/components/ChattingBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ interface ChattingProps extends VariantProps<typeof chatBubbleStyle> {
export default function Chatting({ message, variant }: ChattingProps) {
return (
<div className='w-full flex flex-col'>
<div className={cn(chatBubbleStyle({ variant }))}>{message}</div>
<div
className={cn(chatBubbleStyle({ variant }))}
aria-label={variant === 'sent' ? '๋‚ด ๋ฉ”์‹œ์ง€' : '์ƒ๋Œ€๋ฐฉ ๋ฉ”์‹œ์ง€'}
>
{message}
</div>
</div>
);
}
2 changes: 2 additions & 0 deletions src/pages/chatbot/components/ChattingInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ export default function ChattingInput({ onSend }: ChattingInputProps) {
onKeyDown={handleKeyDown}
type='text'
placeholder='๋ฌด์—‡์ด๋“  ๋ฌผ์–ด๋ณด์„ธ์š”'
aria-label="์ฑ„ํŒ… ๋ฉ”์‹œ์ง€ ์ž…๋ ฅ"
className='w-full bg-transparent outline-none text-label-lg placeholder:text-gray-300 text-gray-900'
/>
</div>

<button
type='button'
onClick={handleSubmit}
aria-label="๋ฉ”์‹œ์ง€ ์ „์†ก"
className={cn(
'w-[4rem] h-[4rem] flex justify-center items-center rounded-[2rem] bg-mint-500 flex-shrink-0',
)}
Expand Down
15 changes: 12 additions & 3 deletions src/pages/chatbot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,23 @@ export default function ChatPage() {
</div>

{/* ๋ฉ”์ธ ์ฝ˜ํ…์ธ  */}
<main className={cn(mainStyle())}>
<main
role="log"
aria-label="์ฑ„ํŒ… ๋‚ด์šฉ"
aria-live="polite"
className={cn(mainStyle())}
>
{/* ๋กœ๊ณ  + ๊ธฐ๋ณธ ๋ฉ˜ํŠธ */}
<div className={cn(introStyle())}>
{/* ๋กœ๊ณ  ์ž๋ฆฌ (์ž„์‹œ) */}
<div className='w-[6rem] h-[6rem] rounded-full bg-gray-200 flex-shrink-0' />
<div
className='w-[6rem] h-[6rem] rounded-full bg-gray-200 flex-shrink-0'
aria-hidden="true"
/>
<Chatting
message='์•ˆ๋…•ํ•˜์„ธ์š”, ๊ธ€๋‹ค์—์š”! ๋ถ€์ฒœ์‹œ ์—ฌํ–‰์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์‰ฝ๊ฒŒ ์•Œ๋ ค๋“œ๋ฆด๊ฒŒ์š”.'
variant='received'
aria-label="๊ธ€๋‹ค์˜ ๋ฉ”์‹œ์ง€: ์•ˆ๋…•ํ•˜์„ธ์š”, ๊ธ€๋‹ค์—์š”! ๋ถ€์ฒœ์‹œ ์—ฌํ–‰์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์‰ฝ๊ฒŒ ์•Œ๋ ค๋“œ๋ฆด๊ฒŒ์š”."
/>
<Chatting
message='์›ํ•˜์‹œ๋Š” ์ •๋ณด๋ฅผ ๋ฌผ์–ด๋ด์ฃผ์„ธ์š”!'
Expand All @@ -73,7 +82,7 @@ export default function ChatPage() {
))}

{/* ์Šคํฌ๋กค */}
<div ref={bottomRef} />
<div ref={bottomRef} aria-hidden="true" />
</main>

{/* ์ž…๋ ฅ์ฐฝ */}
Expand Down
7 changes: 6 additions & 1 deletion src/pages/events/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ const EventDetailPage = () => {
)}
>
{/* ํ–‰์‚ฌ ๊ธฐ๊ฐ„ */}
<div className={cn('flex justify-center w-[18.4rem] mt-[1.3rem]')}>
<div aria-label="ํ–‰์‚ฌ ๊ธฐ๊ฐ„" className={cn('flex justify-center w-[18.4rem] mt-[1.3rem]')}>
<DateTag startDate={startDate} endDate={endDate} />
</div>

{/* ๋Œ€ํ‘œ ์ด๋ฏธ์ง€ */}
<section
aria-label="ํ–‰์‚ฌ ๋Œ€ํ‘œ ์ด๋ฏธ์ง€"
className={cn(
'relative w-full flex justify-center max-w-[35.4rem]',
'mt-[1rem]'
Expand All @@ -55,12 +56,15 @@ const EventDetailPage = () => {
) : (
<div
className={cn('w-full h-[43.6rem] bg-gray-200 rounded-[2rem]')}
role="img"
aria-label={`${name} ์ด๋ฏธ์ง€๊ฐ€ ์ œ๊ณต๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.`}
/>
)}
</section>

{/* ํ–‰์‚ฌ ์นด๋“œ */}
<div
aria-label="ํ–‰์‚ฌ ์ •๋ณด"
className={cn(
'flex flex-col items-center w-full gap-[0.8rem]',
'mt-[0.8rem]'
Expand All @@ -76,6 +80,7 @@ const EventDetailPage = () => {

{/* ๊ด€๋ จ ํ–‰์‚ฌ */}
<div
aria-label="๊ด€๋ จ ํ–‰์‚ฌ ๋ชฉ๋ก"
className={cn(
'grid grid-cols-2 gap-[1.2rem] justify-items-center w-full max-w-[35.4rem]'
)}
Expand Down
7 changes: 5 additions & 2 deletions src/pages/events/components/DateTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ export default function DateTag({
if (!startDate && !endDate) return null;

return (
<div className={cn(dateTagStyle(), className)}>
{formatDate(startDate)} ~ {formatDate(endDate)}
<div
className={cn(dateTagStyle(), className)}
aria-label={`${formatDate(startDate)}๋ถ€ํ„ฐ ${formatDate(endDate)}๊นŒ์ง€`}
>
{formatDate(startDate)} ~ {formatDate(endDate)}
</div>
);
}
13 changes: 11 additions & 2 deletions src/pages/events/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@ export default function EventPage() {
<main className='w-full pt-[6.3rem] flex flex-col items-center'>
{/* ๋‚ ์งœ ์„ ํƒ */}
<div className='w-full mt-[3.7rem] flex justify-start'>
<DatePicker value={date} onChange={setDate} />
{/* ์Šคํฌ๋ฆฐ๋ฆฌ๋”๊ฐ€ โ€œ๋‚ ์งœ ์„ ํƒโ€์œผ๋กœ ์ฝํžˆ๋„๋ก ์ถ”๊ฐ€ */}
<label htmlFor="event-date" className="sr-only">
ํ–‰์‚ฌ ๋‚ ์งœ ์„ ํƒ
</label>
<DatePicker ariaLabel="ํ–‰์‚ฌ ๋‚ ์งœ ์„ ํƒ" value={date} onChange={setDate} />
</div>

{/* ํ–‰์‚ฌ์นด๋“œ & ๋นˆํ™”๋ฉด */}
{filteredEvents.length > 0 ? (
<section
aria-label="์ด๋ฒคํŠธ ๋ชฉ๋ก"
className={cn(
'grid w-full mt-[1.4rem]',
'grid-cols-2 gap-x-[1.4rem] gap-y-[1.4rem]',
Expand All @@ -74,7 +79,11 @@ export default function EventPage() {
))}
</section>
) : (
<div className='flex flex-col items-center justify-center text-center mt-[15rem]'>
<div
className='flex flex-col items-center justify-center text-center mt-[15rem]'
role='status'
aria-live='polite'
>
<Icon name='Stamp' size={120} color='gray-200' />
<h2 className='text-headline-lg-serif text-gray-700 mt-[5rem]'>
Ooops!
Expand Down
13 changes: 11 additions & 2 deletions src/pages/loading/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ import loading_revised from '../../../public/lottie/loading_revised.json';

export default function Loading() {
return (
<div className='flex flex-col items-center justify-between h-[100vh] bg-white'>
<div className='relative w-full h-[22vw] min-h-[14rem] max-h-[28rem]'>
<div
className='flex flex-col items-center justify-between h-[100vh] bg-white'
role='status'
aria-live='polite'
aria-label='ํŽ˜์ด์ง€ ๋กœ๋”ฉ ์ค‘์ž…๋‹ˆ๋‹ค'
>
<div
className='relative w-full h-[22vw] min-h-[14rem] max-h-[28rem]'
aria-hidden="true"
>
<svg
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 402 194'
Expand All @@ -25,6 +33,7 @@ export default function Loading() {
loop
autoplay
className='w-[18rem] h-[18rem]'
aria-hidden="true"
/>
</div>

Expand Down
6 changes: 5 additions & 1 deletion src/pages/main/Board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ const Board = () => {
<div className='relative w-full h-[100vh] bg-[#46d1cd] overflow-auto'>
<Header title='์ง€๋„' onClick={() => router.back()} />

<main className='relative pt-[11.8rem]'>
<main
className='relative pt-[11.8rem]'
role="main"
aria-label="๋ณด๋“œ ์ง€๋„ ํŽ˜์ด์ง€"
>
<Boardgame />
</main>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/main/HiddenReward.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const HiddenReward = () => {
overflow-hidden
cursor-pointer
'
role="main"
aria-label="ํžˆ๋“  ๋ฆฌ์›Œ๋“œ ํš๋“ ํŽ˜์ด์ง€"
onClick={() =>
router.push({
pathname: '/main/PostCard',
Expand Down
8 changes: 7 additions & 1 deletion src/pages/main/Node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ const Board = () => {
onClick={() => router.back()}
/>

<main className='relative pt-[14.3rem] gap-[1.2rem] flex flex-col '>
<main
className='relative pt-[14.3rem] gap-[1.2rem] flex flex-col '
role="main"
aria-label={`${label ? label : '๋…ธ๋“œ'} ์ƒ์„ธ ํŽ˜์ด์ง€`}
>
<section className='relative w-full'>
<Image
src='/assets/board.svg'
Expand All @@ -31,6 +35,7 @@ const Board = () => {
/>

<button
aria-label={isStamp ? '์Šคํƒฌํ”„ ํš๋“ ์™„๋ฃŒ' : '์Šคํƒฌํ”„ ์ฐ๊ธฐ'}
className={cn('absolute bottom-0 right-0', isStamp && 'p-[2.5rem]')}
onClick={
!isStamp
Expand All @@ -50,6 +55,7 @@ const Board = () => {
name={isStamp ? 'Stamp' : 'PressStamp'}
color={isStamp ? 'pink-400' : 'gray-50'}
size={isStamp ? 100 : 160}
aria-hidden="true"
/>
</button>
</section>
Expand Down
8 changes: 6 additions & 2 deletions src/pages/main/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const PostCard = () => {

return (
<div
role="main"
aria-label="์—ฝ์„œ ํš๋“ ํŽ˜์ด์ง€"
className='
relative w-full h-[100vh] px-[2.4rem]
bg-gradient-to-b from-pink-100 to-white
Expand All @@ -30,14 +32,16 @@ const PostCard = () => {
<button
className='flex items-center justify-center w-[4.8rem] h-[4.8rem]'
onClick={handleSave}
aria-label="์—ฝ์„œ ์ด๋ฏธ์ง€ ์ €์žฅ"
>
<Icon name='Save' color='gray-400' size={28} />
<Icon name='Save' color='gray-400' size={28} aria-hidden="true" />
</button>
<button
className='flex items-center justify-center w-[4.8rem] h-[4.8rem]'
onClick={handleShare}
aria-label="์—ฝ์„œ ๊ณต์œ ํ•˜๊ธฐ"
>
<Icon name='Export' color='gray-400' size={28} />
<Icon name='Export' color='gray-400' size={28} aria-hidden="true" />
</button>
</div>

Expand Down
52 changes: 39 additions & 13 deletions src/pages/main/components/board/Boardgame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,70 @@ import { useRouter } from 'next/router';

const Boardgame = () => {
const router = useRouter();

const handleCellClick = (label: string) => {
// TODO : ๋กœ๊ทธ์ธ ์—ฌ๋ถ€ ์ฒดํฌ
router.push({
pathname: '/main/Node',
query: { label },
});
};

return (
<div className='relative w-full h-full bg-[#46d1cd] overflow-hidden'>
<div
className="relative w-full h-full bg-[#46d1cd] overflow-hidden"
role="region"
aria-label="๋ณด๋“œ๊ฒŒ์ž„ ํ™”๋ฉด"
>
<Image
src='/assets/background_.svg'
alt='board background'
src="/assets/background_.svg"
alt=""
width={402}
height={755}
className='w-full h-full object-cover'
className="w-full h-full object-cover"
priority
aria-hidden="true"
/>

<div
className='
className="
absolute top-0 left-0
w-full h-full
grid grid-cols-4 grid-rows-8 gap-0
px-[2rem] pb-[1.7rem]
'
"
role="group"
aria-label="๋ช…์†Œ ํƒํ—˜ ๋ณด๋“œ"
>
{boardData.map((row, r) =>
row.map((cell, c) => {
const key = `cell-${r}-${c}`;

if (!cell.active) {
return <div key={key} className='bg-transparent' />;
return (
<div
key={key}
className="bg-transparent"
aria-hidden="true" // ๋น„ํ™œ์„ฑ ์…€์€ ๋‚ญ๋… ์ œ์™ธ
/>
);
}

return (
<div
key={key}
role="button"
tabIndex={0}
aria-label={cell.label ? `${cell.label} ๋ช…์†Œ๋กœ ์ด๋™` : '๋ช…์†Œ๋กœ ์ด๋™'}
onClick={() => {
// TODO : ๋กœ๊ทธ์ธ ์—ฌ๋ถ€ ์ฒดํฌ
router.push({
pathname: '/main/Node',
query: { label: cell.label },
});
if (cell.label) handleCellClick(cell.label);
}}
onKeyDown={(e) => {
if ((e.key === 'Enter' || e.key === ' ') && cell.label) {
handleCellClick(cell.label);
}
}}
></div>
/>
);
}),
)}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/main/components/stampBoard/Progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const Progress = ({ className, value, ...props }: ProgressProps) => {
)}
value={progressPercent}
max={100}
aria-label="์ง„ํ–‰๋ฅ "
aria-valuetext={`${Math.round(progressPercent)}% ์™„๋ฃŒ๋จ`}
{...props}
>
<ProgressPrimitive.Indicator
Expand Down
5 changes: 3 additions & 2 deletions src/pages/main/components/stampBoard/Stamp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ const Stamp = ({ index, acquired, className }: StampProps) => {
if (acquired) {
return (
<div
role="img"
aria-label={`${index + 1}๋ฒˆ์งธ ์Šคํƒฌํ”„ ${acquired ? 'ํš๋“' : '๋ฏธํš๋“'}`}
className={cn(
'flex items-center justify-center w-[2.8rem] h-[2.8rem]',
className,
)}
aria-label={`${index + 1}๋ฒˆ์งธ ์Šคํƒฌํ”„ ํš๋“`}
>
<Icon name='Stamp' size={28} color='pink-400' aria-hidden />
</div>
Expand All @@ -28,7 +29,7 @@ const Stamp = ({ index, acquired, className }: StampProps) => {
'rounded-full bg-pink-100 w-[2.8rem] h-[2.8rem]',
className,
)}
aria-label={`${index + 1}๋ฒˆ์งธ ์Šคํƒฌํ”„ ๋ฏธํš๋“`}
aria-label={`${index + 1}๋ฒˆ์งธ ์Šคํƒฌํ”„ ํš๋“`}
/>
);
};
Expand Down
2 changes: 0 additions & 2 deletions src/pages/main/components/video/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default function VideoPlayer({ src, label, onEnd }: VideoPlayerProps) {
return (
<div
className="relative w-full h-full overflow-hidden"
role="region"
aria-label={label ? `${label} ์˜์ƒ ํ”Œ๋ ˆ์ด์–ด` : '๋น„๋””์˜ค ๋Œ€๊ธฐ ํ™”๋ฉด'}
>
{src ? (
Expand All @@ -24,7 +23,6 @@ export default function VideoPlayer({ src, label, onEnd }: VideoPlayerProps) {
onEnded={onEnd}
className="w-full h-full rounded-[2rem] object-cover"
aria-label={`${label} ์˜์ƒ`}
aria-describedby="video-description"
/>
) : (
<>
Expand Down
Loading
Loading