282282 text-transform : uppercase;
283283 letter-spacing : 1px ;
284284 position : relative;
285+ min-height : 44px ;
286+ min-width : 44px ;
285287 }
286288
287289 .cta-button : hover {
321323 transform : skew (-10deg );
322324 }
323325
326+ /* Focus styles for keyboard navigation */
327+ : focus-visible {
328+ outline : 4px solid # 000 ;
329+ outline-offset : 2px ;
330+ box-shadow : 0 0 0 6px rgba (255 , 255 , 0 , 0.5 );
331+ }
332+
333+ button : focus-visible ,
334+ a : focus-visible {
335+ outline : 4px solid # 000 ;
336+ outline-offset : 4px ;
337+ background : rgba (255 , 255 , 0 , 0.3 );
338+ box-shadow : 0 0 0 8px rgba (255 , 255 , 0 , 0.5 );
339+ }
340+
341+ /* Remove default focus outline for mouse users */
342+ : focus : not (: focus-visible ) {
343+ outline : none;
344+ }
345+
346+ /* Tablet styles */
347+ @media (max-width : 1024px ) {
348+ .container {
349+ padding : 25px 20px ;
350+ gap : 35px ;
351+ }
352+
353+ h1 {
354+ font-size : 3.5rem ;
355+ }
356+
357+ .tagline {
358+ font-size : 1.5rem ;
359+ }
360+
361+ .pain-point {
362+ font-size : 2rem ;
363+ }
364+
365+ .main-content {
366+ padding : 25px ;
367+ }
368+
369+ .cta-button {
370+ font-size : 1.3rem ;
371+ padding : 20px 40px ;
372+ }
373+ }
374+
375+ /* Mobile styles */
324376 @media (max-width : 768px ) {
325377 .container {
326378 grid-template-columns : 1fr ;
353405 transform : rotate (0deg );
354406 padding : 30px ;
355407 }
408+ .cta-button {
409+ min-width : 44px ;
410+ min-height : 44px ;
411+ padding : 16px 32px ;
412+ font-size : 1.3rem ;
413+ }
356414 .user-types {
357415 flex-direction : column;
358416 }
417+ .user-type {
418+ min-height : 44px ;
419+ padding : 24px ;
420+ }
359421 .bg-accent {
360422 display : none;
361423 }
424+
425+ /* Ensure all interactive elements are 44x44 minimum */
426+ button , a {
427+ min-height : 44px ;
428+ min-width : 44px ;
429+ display : inline-flex;
430+ align-items : center;
431+ justify-content : center;
432+ }
362433 }
363434 </ style >
364435 < script >
400471
401472 // Create popup content
402473 const popup = document . createElement ( "div" ) ;
474+ popup . setAttribute ( "role" , "dialog" ) ;
475+ popup . setAttribute ( "aria-labelledby" , "popup-title" ) ;
476+ popup . setAttribute ( "aria-modal" , "true" ) ;
477+
478+ // Responsive popup styles
479+ const isMobile = window . innerWidth <= 768 ;
403480 popup . style . cssText = `
404481 background: #FFFF00;
405482 border: 5px solid black;
406- border-bottom: 10px solid black;
407- border-right: 10px solid black;
408- box-shadow: 12px 12px 0 black;
409- padding: 40px;
410- max-width: 500px;
483+ border-bottom: ${ isMobile ? '6px' : '10px' } solid black;
484+ border-right: ${ isMobile ? '6px' : '10px' } solid black;
485+ box-shadow: ${ isMobile ? '6px 6px' : '12px 12px' } 0 black;
486+ padding: ${ isMobile ? '20px' : '40px' } ;
487+ max-width: ${ isMobile ? '95%' : '500px' } ;
488+ width: 90%;
489+ max-height: 90vh;
490+ overflow-y: auto;
411491 text-align: center;
412492 font-family: "Arial", "Helvetica", sans-serif;
413- transform: rotate(-1deg);
493+ transform: ${ isMobile ? ' rotate(0deg)' : 'rotate( -1deg)' } ;
414494 ` ;
415495
416496 popup . innerHTML = `
417- <h3 style="font-size: 1.5rem; font-weight: bold; margin-bottom: 20px; color: black;">
497+ <h2 id="popup-title" style="font-size: 1.5rem; font-weight: bold; margin-bottom: 20px; color: black;">
418498 Get Early Access
419- </h3 >
499+ </h2 >
420500 <p style="font-size: 1.1rem; line-height: 1.6; margin-bottom: 25px; color: black;">
421501 Contact us at <a href="${ mailtoLink } " style="color: black; font-weight: bold; text-decoration: underline;">${ email } </a> and we'll give you first access to tools that will change how your team ships code.
422502 </p>
423- <button onclick="closePopup()" style="
503+ <button id="popup-close-btn" onclick="closePopup()" style="
424504 font-family: 'Arial', 'Helvetica', sans-serif;
425505 font-size: 1.1rem;
426506 font-weight: bold;
@@ -440,6 +520,22 @@ <h3 style="font-size: 1.5rem; font-weight: bold; margin-bottom: 20px; color: bla
440520 overlay . appendChild ( popup ) ;
441521 document . body . appendChild ( overlay ) ;
442522
523+ // Save previously focused element
524+ window . previouslyFocused = document . activeElement ;
525+
526+ // Focus the close button
527+ setTimeout ( ( ) => {
528+ document . getElementById ( 'popup-close-btn' ) . focus ( ) ;
529+ } , 100 ) ;
530+
531+ // Handle escape key
532+ function handleEscape ( e ) {
533+ if ( e . key === 'Escape' ) {
534+ closePopup ( ) ;
535+ }
536+ }
537+ document . addEventListener ( 'keydown' , handleEscape ) ;
538+
443539 // Close popup when clicking outside
444540 overlay . addEventListener ( "click" , function ( e ) {
445541 if ( e . target === overlay ) {
@@ -449,32 +545,55 @@ <h3 style="font-size: 1.5rem; font-weight: bold; margin-bottom: 20px; color: bla
449545
450546 // Store reference for closing
451547 window . currentPopup = overlay ;
548+ window . escapeHandler = handleEscape ;
452549 }
453550
454551 function closePopup ( ) {
455552 if ( window . currentPopup ) {
456553 document . body . removeChild ( window . currentPopup ) ;
457554 window . currentPopup = null ;
555+
556+ // Remove escape handler
557+ if ( window . escapeHandler ) {
558+ document . removeEventListener ( 'keydown' , window . escapeHandler ) ;
559+ window . escapeHandler = null ;
560+ }
561+
562+ // Restore focus to previously focused element
563+ if ( window . previouslyFocused ) {
564+ window . previouslyFocused . focus ( ) ;
565+ window . previouslyFocused = null ;
566+ }
458567 }
459568 }
460569 </ script >
461570 </ head >
462571 < body >
572+ <!-- Skip navigation link for screen readers and keyboard users -->
573+ < a href ="#main-content " class ="skip-link " style ="position: absolute; left: -9999px; z-index: 999; padding: 1rem; background: #000; color: #ffff00; text-decoration: none; font-weight: bold; "> Skip to main content</ a >
574+ < style >
575+ .skip-link : focus {
576+ position : fixed;
577+ left : 0 ;
578+ top : 0 ;
579+ z-index : 1001 ;
580+ }
581+ </ style >
463582 <!-- Geometric background accents -->
464583 < div class ="bg-accent bg-accent-1 "> </ div >
465584 < div class ="bg-accent bg-accent-2 "> </ div >
466585 < div class ="bg-accent bg-accent-3 "> </ div >
467586
468587 < div class ="container ">
469588 < div class ="hero-left ">
470- < img src ="media/logo.png " alt ="CodeGroove Logo " class ="logo " />
589+ < img src ="media/logo.png " alt ="CodeGroove - Quality tools for open source engineers " class ="logo " />
471590 < h1 > codeGROOVE</ h1 >
472591 < div class ="tagline ">
473592 Open-source friendly developer tools that scale
474593 </ div >
475594 </ div >
476595
477- < div class ="hero-right ">
596+ < main id =" main-content " class ="hero-right ">
478597 < div class ="pain-point "> Out-ship your competition.</ div >
479598
480599 < div class ="main-content ">
@@ -530,15 +649,16 @@ <h3>Enterprise Engineering Teams</h3>
530649 >
531650 Keep your engineers in the groove.
532651 </ h2 >
533- < a
534- href ="# "
652+ < button
535653 class ="cta-button "
536- onclick ="sendEmail(); return false; "
537- > Get Early Access</ a
654+ onclick ="sendEmail() "
655+ type ="button "
656+ aria-label ="Get early access to CodeGroove developer tools "
657+ > Get Early Access</ button
538658 >
539659 </ div >
540660 </ div >
541- </ div >
661+ </ main >
542662 </ div >
543663 </ body >
544664</ html >
0 commit comments