How tamilselvan27/front-end-mentor-accordion works
Project type and purpose
• This is a purely frontend, static “FAQ accordion” web page coding challenge.
• It consists of an HTML file (index.html), CSS/SCSS (style-guide.md guiding your styles), JavaScript for accordion behavior, and static assets (images, fonts).
File structure
• Top-level files:
• index.html – the single-page entry point
• style-guide.md – contains palette, typography guidelines
• README.md / README-template.md – documentation
• Directories:
• assets/ – images and local font files
• design/ – static JPG previews of the target UI
• No backend code, no build scripts, no server-side components.
README for additional insights
• It confirms the challenge is to reproduce a responsive FAQ accordion.
• Users must be able to toggle answers, navigate via keyboard, and see hover/focus states.
• Hosting is entirely static (GitHub Pages, Netlify, Vercel, etc.).
Main components
a. Browser (User Agent)
• Renders HTML, applies CSS, runs JavaScript.
• Handles user interactions (click, keyboard).
b. Static Hosting / CDN
• Serves index.html, CSS, JS, assets.
• Could be GitHub Pages, Netlify, Vercel, Cloudflare Pages.
c. Assets
• Images (SVG/PNG/JPG) loaded by HTML/CSS.
• Local font files or external Google Fonts endpoint.
d. Optional External Service
• Google Fonts (if not using local fonts).
e. Design References (offline)
• design/ JPEGS used by developers to inspect layouts.
Relationships & data flows
• User → Browser: interactions (click, keypress).
• Browser → Hosting/CDN: HTTP GET index.html → CSS → JS → assets.
• Browser ↔ External Google Fonts (if enabled).
• JS in Browser → DOM manipulation (show/hide answers).
Architectural patterns & design principles
• Separation of concerns: HTML for structure, CSS for styling, JS for behavior.
• Progressive enhancement: basic HTML content available even if JS disabled.
• Responsive design: CSS media queries adapt layout to device width.
• Accessibility: keyboard navigation, focus states, ARIA attributes.