Skip to content

Tilde update structure css #30

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 104 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
785bb94
Co-authored-by: tildetilde <tildetilde@users.noreply.github.com>
oskarnordin Mar 26, 2025
9bc91a3
update
oskarnordin Mar 27, 2025
c745cf6
added file for quiz questions
Idahel Mar 27, 2025
1391cf3
added high quality pictures
tildetilde Mar 27, 2025
424ab63
Merge pull request #1 from oskarnordin/tilde_picture
tildetilde Mar 27, 2025
0c46322
Merge pull request #2 from oskarnordin/add-js-file-for-questions
Idahel Mar 27, 2025
21631ee
Added CSS root
tildetilde Mar 27, 2025
2deef6b
Merge pull request #3 from oskarnordin/Tilde-CSS-root
tildetilde Mar 27, 2025
5213ec1
Added link tom about html file.
oskarnordin Mar 27, 2025
072e4fc
added data to quizdata.js
Idahel Mar 27, 2025
be1a6e9
Merge pull request #4 from oskarnordin/questions-array
Idahel Mar 27, 2025
05e20e0
Update index.html
tildetilde Mar 27, 2025
7598ee1
Merge pull request #5 from oskarnordin/tilde-adding-new-images
tildetilde Mar 27, 2025
be10664
test
Idahel Mar 27, 2025
c1ff538
Merge pull request #6 from oskarnordin/test
Idahel Mar 27, 2025
d315bce
Merge pull request #7 from oskarnordin/add-link-to-about
oskarnordin Mar 27, 2025
ef0613e
Added startQuiz button on top of the banner img.
oskarnordin Mar 27, 2025
93e1847
Merge pull request #8 from oskarnordin/start-quiz-button-html
oskarnordin Mar 27, 2025
9d99e79
git commit -mdded
Idahel Mar 27, 2025
3bd0632
Merge branch 'main' into start-quiz-button-function
Idahel Mar 27, 2025
a76f6ec
Merge pull request #9 from oskarnordin/start-quiz-button-function
Idahel Mar 27, 2025
2235bfa
Added functions for the quiz
Idahel Mar 27, 2025
3f2a73e
added image to result page
Idahel Mar 27, 2025
7a46f05
bug fixing - back to main button now resetsthe main content with the …
Idahel Mar 27, 2025
182dad1
Merge pull request #10 from oskarnordin/start-quiz-button-function
Idahel Mar 27, 2025
6105985
added explanation to each line of code
Idahel Mar 27, 2025
5ee9dcd
Fixed header and responsiveness
tildetilde Mar 27, 2025
277d83c
Merge pull request #11 from oskarnordin/tilde-imprved-header
tildetilde Mar 27, 2025
8d709a8
flex-end to header
tildetilde Mar 27, 2025
89e5b9a
making h2 align with grid
tildetilde Mar 27, 2025
081a0e2
Merge pull request #12 from oskarnordin/fix-responsive
tildetilde Mar 27, 2025
87b4d8d
added lang=en
tildetilde Mar 28, 2025
a7433f9
Merge pull request #13 from oskarnordin/tilde-html-lang
tildetilde Mar 28, 2025
7505ab0
added nav to nav and making skip to content hidden
tildetilde Mar 28, 2025
becd397
Merge pull request #14 from oskarnordin/tilde-html-nav
tildetilde Mar 28, 2025
3f6c817
updated styling for nav
tildetilde Mar 28, 2025
fef8206
Making skip to main content hidden
tildetilde Mar 28, 2025
219e030
Merge pull request #15 from oskarnordin/hide-skip-to-main-content
tildetilde Mar 28, 2025
a11f0d6
added progress bar
tildetilde Mar 28, 2025
7b84b71
styled radio inputs, added feedback colors
tildetilde Mar 28, 2025
3d27201
Merge pull request #16 from oskarnordin/styling-radio-buttons
tildetilde Mar 28, 2025
96582da
styling of fieldset
tildetilde Mar 28, 2025
36f64ae
Merge pull request #17 from oskarnordin/tilde-styling-quiz
tildetilde Mar 28, 2025
7018503
Added about page.
oskarnordin Mar 28, 2025
22a2fe6
Merge pull request #18 from oskarnordin/create-about-page
oskarnordin Mar 28, 2025
5ee0fcf
Styled result page.
oskarnordin Mar 28, 2025
bc4f438
Merge pull request #19 from oskarnordin/styling-result-page
oskarnordin Mar 28, 2025
530f3ff
Made index and about pages more ARIA friendly.
oskarnordin Mar 29, 2025
aecc9a8
Merge pull request #20 from oskarnordin/accessibility-html
oskarnordin Mar 29, 2025
9294fde
Centered footer content.
oskarnordin Mar 29, 2025
6f3d26d
Made footer centered.
oskarnordin Mar 29, 2025
cdd83b2
Co-authored-by: tildetilde <tildetilde@users.noreply.github.com>
oskarnordin Mar 29, 2025
ee2ddb8
Update styles.css
oskarnordin Mar 30, 2025
ace2935
Merge pull request #21 from oskarnordin/css-style-changes
oskarnordin Mar 30, 2025
56d7316
bug fix - added parseInt on row 105 in main.js, the correct answer me…
Idahel Mar 31, 2025
5ca9b50
Merge pull request #22 from oskarnordin/debug-quiz-feedback
Idahel Mar 31, 2025
7c9a795
styling fixes
oskarnordin Mar 31, 2025
2786cc8
Merge pull request #23 from oskarnordin/css-fixes
oskarnordin Mar 31, 2025
e6f8166
Added loading state with aria labels
tildetilde Apr 1, 2025
261cb4a
Merge pull request #24 from oskarnordin/tildenewloadingstate
tildetilde Apr 1, 2025
69a295c
restructured the main.js file and created the quiz elements in the in…
Idahel Apr 1, 2025
9809f00
Merge branch 'main' into quizelements-html
Idahel Apr 1, 2025
3564a26
Merge pull request #25 from oskarnordin/quizelements-html
Idahel Apr 1, 2025
5b703ef
bug fixes, next button and answer style
Idahel Apr 1, 2025
858a9e7
removed consolelogs
Idahel Apr 1, 2025
cfad4a9
Merge pull request #27 from oskarnordin/bugfixes-main.js
Idahel Apr 1, 2025
7b5cc00
added window location when clicking the go back to main button
Idahel Apr 1, 2025
157eb35
Merge pull request #28 from oskarnordin/js-fix
Idahel Apr 1, 2025
60a967b
test
Idahel Apr 1, 2025
280a57c
Merge pull request #29 from oskarnordin/js-test
Idahel Apr 1, 2025
2bdb31f
Skip to main content updated to not disrupt h1
tildetilde Apr 1, 2025
a22cee0
Merge pull request #30 from oskarnordin/tilde-skip-to-main-content-up…
tildetilde Apr 1, 2025
3223d67
Improved design result page
tildetilde Apr 1, 2025
8139643
Merge pull request #31 from oskarnordin/improving-design-results-page
tildetilde Apr 1, 2025
8110d76
Improved footer design
tildetilde Apr 1, 2025
3067431
Merge pull request #32 from oskarnordin/tilde-improve-footer
tildetilde Apr 1, 2025
f095453
Added logo and changed padding to adjust height
tildetilde Apr 1, 2025
cd97847
Merge pull request #33 from oskarnordin/tilde-improve-footer
tildetilde Apr 1, 2025
6475457
Image optimization + cards fix
oskarnordin Apr 1, 2025
ecfe5de
Merge pull request #34 from oskarnordin/oskar-changes-css
oskarnordin Apr 1, 2025
b6988ef
added scrollIntoView on backtomain-button, now it scrolls up to the h…
Idahel Apr 2, 2025
c6d01fd
Merge pull request #35 from oskarnordin/js-backtomain
Idahel Apr 2, 2025
deb8450
Update README.md
tildetilde Apr 2, 2025
82bbb15
Update styles.css
tildetilde Apr 2, 2025
da69620
Revert "Merge pull request #34 from oskarnordin/oskar-changes-css"
tildetilde Apr 2, 2025
0a7c3c2
Update main.js
tildetilde Apr 2, 2025
f45eec1
Merge pull request #36 from oskarnordin/tilde-reset-to-working-site
tildetilde Apr 2, 2025
8328c4b
Merge branch 'main' into tilde-reduced-motion
tildetilde Apr 2, 2025
5a13916
Merge pull request #37 from oskarnordin/tilde-reduced-motion
tildetilde Apr 2, 2025
78c7ec3
updated quiz styling
Idahel Apr 2, 2025
bd746f3
Merge pull request #38 from oskarnordin/test-css-bug
Idahel Apr 2, 2025
6526301
fixed button-css
Idahel Apr 2, 2025
f2f4391
Merge pull request #39 from oskarnordin/fix-css-buttons
Idahel Apr 2, 2025
17e9875
updated about semantics and styling
tildetilde Apr 2, 2025
d914b49
changed size on h2 in result page
Idahel Apr 2, 2025
a13942d
Merge pull request #41 from oskarnordin/css-result-page
Idahel Apr 2, 2025
77b9a0f
Merge branch 'main' into tilde-aria-labels-and-alt-texts-html
tildetilde Apr 2, 2025
5a8defd
Merge pull request #40 from oskarnordin/tilde-aria-labels-and-alt-tex…
tildetilde Apr 2, 2025
fac3358
changed about text
tildetilde Apr 2, 2025
4b1f88a
update skip to main content for about
tildetilde Apr 2, 2025
a126265
Merge pull request #42 from oskarnordin/skip-to-main-content-about
tildetilde Apr 2, 2025
d57fd21
updatet button
tildetilde Apr 2, 2025
bfee09b
Merge pull request #43 from oskarnordin/tilde-improved-start-quiz-but…
tildetilde Apr 2, 2025
673a4f9
Update styles.css
tildetilde Apr 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# Web Accessibility Project

A basic web server template focused on web accessibility practices.

### Installation

1. Fork this repository by clicking the "Fork" button at the top right of the GitHub repository page.

2. Clone your forked repository
Checkout our site
https://js-project-accessibility-on.netlify.app/
60 changes: 56 additions & 4 deletions about.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,62 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>About</title>
<link rel="stylesheet" href="css/styles.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
rel="stylesheet"
/>
<title>Web Accessibility</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body></body>
<body>
<a href="#mainContent" class="skip-link">Skip to main content</a>
<header id="header">
<div class="headerInner">
<h1>Web Accessibility Quiz</h1>
<div class="headerContent">
<nav aria-label="Main menu">

<a href="index.html">Home</a> <a href="about.html">About</a>
</nav>
</div>
</div>
</header>

<main id="mainContent">
<section class="about-section" aria-labelledby="about-heading">
<div class="formControls introSection">
<div class="about-container">
<h2 id="about-heading">Our mission</h2>
<p>
This website is built by Ida, Oskar and Tilde as part of a course on web accessibility. It’s designed to be as accessible as possible for all users and to serve as a learning tool. We’ve included semantic HTML, keyboard navigation, ARIA roles, and good color contrast to support screen readers and other assistive tech. <span class="accessibility-quote">Because accessibility isn’t extra — it’s essential.</span>
</p>
<img
src="img/about.png"
role="presentation"
class="about-img"
/>
</div>
</section>
</main>

<hr/>

<footer role="contentInfo">
<div class="footerContent">
<p class="footer-text">For everyone. Built by Ida, Oskar and Tilde.</p>
<img
src="img/idaoskartilde.svg"
role="presentation"
class="footer-logo"
/>
</div>
</footer>

<script src="quizdata.js"></script>
<script src="js/main.js"></script>
</body>
</html>
78 changes: 78 additions & 0 deletions accordionScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
function initAccordion() {
const accordion = document.querySelector(".accordion");

if (!accordion) return;

const buttons = accordion.querySelectorAll(".accordionButton");

buttons.forEach((button, index) => {
button.addEventListener("keydown", (event) => {
const targetId = button.getAttribute("aria-controls");
const targetPanel = document.getElementById(targetId);

switch (event.key) {
case "ArrowDown":
case "ArrowRight":
event.preventDefault();
const nextButton = buttons[(index + 1) % buttons.length];
nextButton.focus();
break;

case "ArrowUp":
case "ArrowLeft":
event.preventDefault();
const prevButton =
buttons[(index - 1 + buttons.length) % buttons.length];
prevButton.focus();
break;

case "Home":
event.preventDefault();
buttons[0].focus();
break;

case "End":
event.preventDefault();
buttons[buttons.length - 1].focus();
break;

case " ":
case "Enter":
event.preventDefault();
togglePanel(button, targetPanel);
break;
}
});

button.addEventListener("click", () => {
const targetId = button.getAttribute("aria-controls");
const targetPanel = document.getElementById(targetId);
togglePanel(button, targetPanel);
});
});
}

function togglePanel(button, panel) {
const isExpanded = button.getAttribute("aria-expanded") === "true";
const newExpandedState = !isExpanded;

button.setAttribute("aria-expanded", newExpandedState);

if (newExpandedState) {
panel.hidden = false;
requestAnimationFrame(() => {
panel.style.maxHeight = panel.scrollHeight + "px";
});
} else {
panel.style.maxHeight = "0";
panel.addEventListener(
"transitionend",
() => {
panel.hidden = true;
},
{ once: true }
);
}
}

document.addEventListener("DOMContentLoaded", initAccordion);
Empty file removed css/styles.css
Empty file.
Binary file added img/HQbanner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/HQprinciple1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/HQprinciple2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/HQprinciple3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/HQprinciple4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions img/idaoskartilde.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/principle1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/principle2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/principle3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/principle4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
166 changes: 162 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,171 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title</title>
<link rel="stylesheet" href="css/styles.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
rel="stylesheet"
/>
<title>Web Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<p>This is the starting point.</p>
<a href="#mainContent" class="skip-link">Skip to main content</a>

<header id="header">
<div class="headerInner">
<h1 id="site-title">Web Accessibility Quiz</h1>
<div class="headerContent">
<nav aria-label="Main menu">
<a href="index.html">Home</a>
<a href="about.html">About</a>
</nav>
</div>
</div>
</header>

<main id="mainContent">
<section id="quiz-container" class="quiz-container" hidden>
<div class="progress-container" id="progress-container">
<div class="progress-text" id="progress-text"></div>
<div class="progress-bar" id="progress-bar">
<div class="progress-fill" id="progress-fill"></div>
</div>
</div>
<h2 id="question-heading" class="question-heading"></h2>
<fieldset
class="question-fieldset"
id="question-fieldset"
aria-labelledby="question-heading"
></fieldset>
<div
class="feedback-message"
id="feedback-message"
aria-live="polite"
role="alert"
></div>
<button class="submit-btn" id="submit-btn">Submit</button>
<button class="next-btn" id="next-btn" hidden>Next question</button>
</section>

<div class="resultCard" id="resultCard" hidden>
<div class="container">
<h2 class="result-heading">Result</h2>
<div
class="result-message"
id="resultMessage"
aria-live="polite"
role="status"
></div>
<img
src="img/results.png"
alt=""
role="presentation"
class="resultImg"
id="resultImg"
/>
<button class="back-to-main-btn" id="back-to-main-btn">
Back to main
</button>
</div>
</div>

<section id="banner">
<button
class="startQuizButton"
id="start-quiz-btn"
aria-label="Start the web accessibility quiz"
>
Start Quiz
</button>
<img src="img/HQbanner.png" alt="" id="bannerImg" />
</section>

<section id="introduction" aria-labelledby="intro-heading">
<div class="formControls introSection">
<div class="container">
<h2 id="intro-heading">Four Principles of Accessibility</h2>
<div class="cardsContainer">
<div class="cards" role="listitem">
<img
src="img/HQprinciple1.png"
class="principlesImg"
alt="A human head, symbolizing perception."
/>
<h3>Perception</h3>
<p>
Information and user interface components must be presentable
to users in ways they can perceive.
</p>
</div>
<div class="cards" role="listitem">
<img
src="img/HQprinciple2.png"
class="principlesImg"
alt="A car, symbolizing operable user interfaces."
/>
<h3>Operable</h3>
<p>
User interface components and navigation must be operable by
all users.
</p>
</div>
<div class="cards" role="listitem">
<img
src="img/HQprinciple3.png"
class="principlesImg"
alt="A brain-shaped cloud, symbolizing understandability."
/>
<h3>Understandable</h3>
<p>
Information and the operation of the user interface must be
understandable.
</p>
</div>
<div class="cards" role="listitem">
<img
src="img/HQprinciple4.png"
class="principlesImg"
alt="A keyboard, symbolizing robustness."
/>
<h3>Robust</h3>
<p>
Content must be robust enough to be interpreted reliably by a
wide variety of user agents, including assistive technologies.
</p>
</div>
</div>
</div>
</div>
</section>
</main>
<div
id="spinner-container"
class="spinner-container"
role="status"
aria-live="polite"
hidden
>
<div class="spinner" aria-label="Loading content"></div>
<span class="sr-only">Loading content...</span>
</div>
<hr />
<footer role="contentInfo">
<div class="footerContent">
<p class="footer-text">For everyone. Built by Ida, Oskar and Tilde.</p>
<img
src="img/idaoskartilde.svg"
alt=""
role="presentation"
class="footer-logo"
/>
</div>
</footer>

<script src="quizdata.js"></script>
<script src="js/main.js"></script>
</body>
</html>
Loading