Skip to content

Commit b11fad4

Browse files
committed
xd
1 parent ffe85e2 commit b11fad4

File tree

2 files changed

+31
-17
lines changed

2 files changed

+31
-17
lines changed

components/new/Folder.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,17 @@ const Folder: React.FC<FolderProps> = ({
125125

126126
return (
127127
<div style={scaleStyle} className={className}>
128-
<div
129-
role="button"
130-
tabIndex={0}
131-
aria-pressed={open}
132-
aria-label={open ? 'Close social links folder' : 'Open social links folder'}
133-
onKeyDown={(e) => {
134-
if (e.key === 'Enter' || e.key === ' ') {
135-
e.preventDefault(); // evita scroll con barra espaciadora
136-
handleClick();
137-
}
138-
}}
128+
<div
129+
role="button"
130+
tabIndex={0}
131+
aria-pressed={open}
132+
aria-label={open ? 'Close social links folder' : 'Open social links folder'}
133+
onKeyDown={(e) => {
134+
if (e.key === 'Enter' || e.key === ' ') {
135+
e.preventDefault() // evita scroll con barra espaciadora
136+
handleClick()
137+
}
138+
}}
139139
className={`group relative mt-16 cursor-pointer transition-all duration-200 ease-in ${
140140
!open ? 'hover:-translate-y-2' : ''
141141
}`}

components/new/ProjectSection.tsx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ export function ProjectsSection() {
109109

110110
<div className="projects-grid grid gap-6 md:grid-cols-2 lg:grid-cols-3">
111111
{projects.map((project, index) => (
112-
<div
113-
key={project.id}
114-
className="project-card group transform cursor-pointer transition-all duration-500 hover:-rotate-1 hover:scale-105"
112+
<button
113+
type="button"
115114
onClick={() => openProjectDetails(project)}
115+
aria-label={`Open details for ${project.title}`}
116+
className="project-card … focus-visible:outline-red-500"
117+
key={index}
116118
>
117119
<div className="hover:shadow-3xl relative z-10 w-[350px] overflow-hidden rounded-3xl border border-red-500/20 bg-gradient-to-tr from-[#0F0F0F] to-[#0B0B0B] text-white shadow-2xl backdrop-blur-xl duration-700 hover:border-red-500/40 hover:shadow-red-500/10">
118120
{' '}
@@ -174,19 +176,31 @@ export function ProjectsSection() {
174176
<div className="absolute left-0 top-0 h-20 w-20 rounded-br-3xl bg-gradient-to-br from-red-500/10 to-transparent opacity-0 transition-opacity duration-500 group-hover:opacity-100"></div>
175177
<div className="absolute bottom-0 right-0 h-20 w-20 rounded-tl-3xl bg-gradient-to-tl from-red-500/10 to-transparent opacity-0 transition-opacity duration-500 group-hover:opacity-100"></div>
176178
</div>
177-
</div>
179+
</button>
178180
))}
179181
</div>
180182
</div>
181183

182184
{isModalOpen && selectedProject && (
183185
<div
184186
className="fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4 backdrop-blur-sm"
185-
onClick={closeProjectDetails} // Close when clicking outside content
187+
role="button"
188+
tabIndex={0}
189+
aria-label="Close project details"
190+
onClick={closeProjectDetails}
191+
onKeyDown={(e) => {
192+
if (e.key === 'Enter' || e.key === ' ') {
193+
e.preventDefault()
194+
closeProjectDetails()
195+
}
196+
}}
186197
>
187198
<div
188199
className="animate-fade-in-up relative w-full max-w-md rounded-lg border border-red-500/20 bg-gray-900 p-6 text-white shadow-2xl md:max-w-lg md:p-8 lg:max-w-xl"
189-
onClick={(e) => e.stopPropagation()} // Prevent closing when clicking inside content
200+
role="dialog"
201+
aria-modal="true"
202+
/* antes: onClick={(e) => e.stopPropagation()} */
203+
onMouseDown={(e) => e.stopPropagation()}
190204
>
191205
<button
192206
onClick={closeProjectDetails}

0 commit comments

Comments
 (0)