@@ -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