Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
}
7 changes: 1 addition & 6 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.
github.com/HolaCarmensita/js-project-accessibility.

### Installation

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

2. Clone your forked repository
43 changes: 42 additions & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,46 @@
<title>About</title>
<link rel="stylesheet" href="css/styles.css" />
</head>
<body></body>
<body>
<header>
<h1>Accessibility</h1>
<nav role="navigation" aria-label="Main menu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
</ul>
</nav>
</header>
<section id="about"></section>
<h2>Contribute to a more inclusive web</h2>

<p>
This project gave me the opportunity to apply key accessibility principles
and contribute to a more inclusive web. It’s been a valuable learning
experience that really highlighted the importance of designing for all
users. Here are some helpful links to documentation that can support you
as a developer on your journey to prioritizing accessibility on the web
and helping ensure equal opportunities for everyone.
</p>
<a href="">link1 </a>
<a href="">link2 </a>

<a href="">link3</a>

<a href="">link4 </a>

<h2>About this site</h2>

<p>
This website was created as part of a course focused on web accessibility
– the practice of building websites that are usable for everyone,
including those who use screen readers, keyboard navigation, or other
assistive technologies. As part of the course, the task was to build a
multiple-choice quiz with accessibility in mind. This project has been all
about applying accessibility principles in practice, ensuring that the
interface is not only functional, but also inclusive. Whether you're
navigating with a mouse, a keyboard, or assistive tools, this site is
designed to offer a smooth and user-friendly experience for all.
</p>
</body>
</html>
227 changes: 227 additions & 0 deletions css/form.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}

.step {
height: 15px;
width: 15px;
margin: 0 2px;
background-color: #bbbbbb;
border: none;
border-radius: 50%;
display: inline-block;
opacity: 0.5;
}

.step.active {
opacity: 1;
}

/* Mark the steps that are finished and valid: */
.step.finish {
background-color: #04aa6d;
}

input[type='radio'] {
color: var(--melon);
}

.quiz-introduction {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 5rem;
padding-bottom: 5rem;
background-color: antiquewhite;
}

.quiz-introduction-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 3rem;
max-width: 65ch;
line-height: 1.6;
background-color: white;
padding: 3rem;
}

/* .quiz-introduction-container h2 {
text-align: center;
margin-bottom: 1rem;
} */

/* fieldset {
border: 1px solid var(--sea-green);
margin: 1em 0;
padding: 1em;
border-radius: 4px;
} */

#quiz {
margin: 0 auto;
padding: 3rem 1rem;
min-height: 100vh;
background-color: #f9f9f9; /* soft light background */
}

#quiz-form {
background-color: white;
padding: 2rem 2.5rem;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
max-width: 700px;
width: 100%;
display: flex;
flex-direction: column;
gap: 2rem;
}

#quiz-form h2 {
text-align: center;
font-size: 1.8rem;
margin-bottom: 1rem;
}

#btn-container {
display: flex;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
}

fieldset.tab {
border: 2px solid black;
padding: 1.5rem;
margin-bottom: 2rem;
background-color: white;
color: black;
border-radius: 6px;
}

fieldset.tab legend {
font-size: 1.2rem;
font-weight: bold;
padding: 0.5rem 1rem;
border: 2px solid black;
background-color: black;
color: white;
border-radius: 4px;
margin-bottom: 1rem;
}

fieldset.tab label {
display: block;
margin: 0.5rem 0;
cursor: pointer;
font-size: 1rem;
}

fieldset.tab input[type='radio'] {
margin-right: 0.5rem;
}

legend {
font-weight: bold;
padding: 0.5em 1em;
color: var(--sea-green);
border: 1px solid var(--sea-green);
border-radius: 4px;
}

/* input[type='radio']:focus-visible + label,
label:has(input[type='radio']:focus-visible) {
outline: 2px solid black;
outline-offset: 2px;
} */

fieldset.error {
border: 2px solid red;
padding: 1rem;
}

.error-message {
color: red;
font-weight: bold;
margin-top: 0.5rem;
}

.correct {
color: green;
font-weight: bold;
}

.incorrect {
color: red;
font-weight: bold;
}

.review-question {
margin-bottom: 1rem;
padding: 1rem;
border: 1px solid #ddd;
border-radius: 0.5rem;
background-color: #f9f9f9;
}

.step {
height: 16px;
width: 16px;
margin: 0 4px;
background-color: #ccc;
border-radius: 50%;
display: inline-block;
opacity: 0.5;
transition: all 0.3s ease;
}

.step.active {
background-color: #04aa6d;
opacity: 1;
}

.step.completed {
background-color: #2e8b57; /* lite mörkare grönt */
opacity: 1;
}
/* .radio-group {
margin: 1em 0;
} */

/* Enhanced radio button styling */
/* .radio-option {
position: relative;
padding: 0.75em;
margin: 0.5em 0;
border-radius: 4px;
transition: background-color 0.2s;
display: flex;
align-items: center;
} */
/*
.radio-option:hover {
background-color: rgba(44, 62, 80, 0.1);
} */

/* Custom radio button styling */
/* input[type='radio'] {
margin-right: 0.75em;
width: 20px;
height: 20px;
} */

/* input[type='radio']:focus-visible + label {
outline: var(--focus-outline);
outline-offset: 2px;
border-radius: 2px;
}

input[type='radio'] + label {
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
transition: background-color 0.2s;
flex: 1;
} */
Loading