WowFolio icon indicating copy to clipboard operation
WowFolio copied to clipboard

Code quality improvements: fix HTML validation, enhance accessibility, refactor JavaScript

Open Copilot opened this issue 3 weeks ago • 1 comments

Comprehensive code quality pass addressing HTML validation errors, accessibility issues, JavaScript duplication, and CSS redundancy.

HTML

  • Fixed validation errors: duplicate href attribute, unclosed <span> tag
  • Removed duplicate skills from list (15 → 8 unique items)
  • Changed mobile menu from <div> to semantic <button> elements
  • Added proper form attributes: id, name, type="email", required
  • Improved alt text: "logo Image""John Anderson Profile", "Project Image""Project screenshot"
  • Added ARIA labels: aria-label="Main navigation", aria-expanded for mobile menu state

JavaScript

  • Refactored 75+ lines of duplicated menu animation code into reusable functions:
// Before: Repeated 3 times with hardcoded values
smMenuLink4.style.transitionDelay = '0s'
smMenuLink4.style.transform = 'translateY(50px)'
smMenuLink4.style.opacity = '0'
// ... repeated for each link

// After: Single reusable function
function animateMenuLinks(links, show) {
  const delays = [0.5, 0.8, 1.1, 1.4];
  links.forEach((link, index) => {
    link.style.transitionDelay = `${show ? delays[index] : delays.length - 1 - index}s`;
    link.style.transform = `translateY(${show ? '0' : '50px'})`;
    link.style.opacity = show ? '1' : '0';
  });
}
  • Added null checks for all DOM queries
  • Added JSDoc comments for all functions
  • Fixed typo: headerLogoConatinerheaderLogoContainer
  • Replaced obsolete eventFire function with native .click()
  • Added smooth scroll behavior: scrollIntoView({ behavior: 'smooth' })

CSS

  • Removed redundant border: none overridden by border: 2px solid
  • Added button reset styles for mobile menu: background: none, border: none, cursor: pointer

Repository

  • Added .gitignore for OS/editor files

Screenshots

Desktop Desktop view

Mobile Menu Mobile menu


Security: CodeQL scan passed (0 alerts) Stats: -149 lines, +179 lines across 4 files

Original prompt

identify and suggest code improvements in this repo


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Oct 31 '25 21:10 Copilot

Deploy Preview for wowfolio ready!

Name Link
Latest commit bf592eb050299045f2a4127738cb2bc76cf079bc
Latest deploy log https://app.netlify.com/projects/wowfolio/deploys/690527ffac35ab00082dde5f
Deploy Preview https://deploy-preview-7--wowfolio.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Oct 31 '25 21:10 netlify[bot]