13: Labor und Demos
|
|
@ -0,0 +1,66 @@
|
|||
# Übungsblatt 13
|
||||
|
||||
*Für das gesamte Übungsblatt ist keine Abgabe erforderlich.*
|
||||
|
||||
## 1. Übung zu Responsive Design: Media Queries
|
||||
|
||||
**Frage:** Welche *Media Query* trifft auf welches Gerät zu?
|
||||
|
||||
a. Smartphone: 320 x 480px
|
||||
|
||||

|
||||
|
||||
b. Smartphone quer gehalten: 960 x 640px
|
||||
|
||||

|
||||
|
||||
c. PC-Bildschirm: 1600 x 900px mit Browserfenster: 800 x 500px
|
||||
|
||||

|
||||
|
||||
d. Tablet quer gehalten: 2048 x 1539px
|
||||
|
||||

|
||||
|
||||
1.
|
||||
```css
|
||||
@media screen
|
||||
```
|
||||
|
||||
2.
|
||||
```css
|
||||
@media screen and (max-width: 800px)
|
||||
```
|
||||
|
||||
3.
|
||||
```css
|
||||
@media screen and (orientation: portrait)
|
||||
```
|
||||
|
||||
4.
|
||||
```css
|
||||
@media screen and (min-device-width: 900px)
|
||||
```
|
||||
|
||||
5.
|
||||
```css
|
||||
@media screen and (min-width: 900px)
|
||||
```
|
||||
|
||||
6.
|
||||
```css
|
||||
@media print and (min-width: 30cm)
|
||||
```
|
||||
|
||||
7.
|
||||
```css
|
||||
@media screen and (max-device-height: 1400px)
|
||||
```
|
||||
|
||||
## 2. Übung zu Barrierefreiheit
|
||||
|
||||
|
||||
**Aufgabenstellung**: Gegen welche WCAG-Erfolgskriterien verstößt folgendes Web-Kontaktformular?
|
||||
|
||||

|
||||
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link href="demo_styles_Lieblingsbuecher.css" rel="stylesheet">
|
||||
<title>Meine Lieblingsbücher</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="logo-container">
|
||||
<img src="img/buecher.png" alt="Buecher">
|
||||
</div>
|
||||
|
||||
<nav id="navbar-container">
|
||||
<a href="#fitzek">Sebastian Fitzek</a>
|
||||
<a href="#neuhaus">Nele Neuhaus</a>
|
||||
<a href="#garmus">Bonnie Garmus</a>
|
||||
<a href="#schlink">Bernhard Schlink</a>
|
||||
<a href="#follett">Ken Follett</a>
|
||||
</nav>
|
||||
|
||||
<div class="content-container">
|
||||
<h1>Lieblingsbücher</h1>
|
||||
|
||||
<div id="fitzek" class="buch-element">
|
||||
<a href="https://www.thalia.de/shop/home/artikeldetails/A1071531890" target="_blank">Die
|
||||
Einladung</a>
|
||||
<br>
|
||||
<br>
|
||||
Sebastian Fitzek
|
||||
<br>
|
||||
ca. 400
|
||||
</div>
|
||||
<div id="neuhaus" class="buch-element">
|
||||
<a href="https://www.thalia.de/shop/home/artikeldetails/A1068434145" target="_blank">Monster</a>
|
||||
<br><br>
|
||||
Nele Neuhaus
|
||||
<br>
|
||||
ca. 560
|
||||
</div>
|
||||
<div id="garmus" class="buch-element">
|
||||
<a href="https://www.thalia.de/shop/home/artikeldetails/A1062299989" target="_blank">Eine Frage
|
||||
der Chemie</a><br><br>
|
||||
Bonnie Garmus
|
||||
<br>
|
||||
ca. 464
|
||||
</div>
|
||||
<div id="schlink" class="buch-element">
|
||||
<a href="https://www.thalia.de/shop/home/artikeldetails/A1069244098" target="_blank">Das späte
|
||||
Leben</a><br><br>
|
||||
Bernhard Schlink
|
||||
<br>
|
||||
ca. 240
|
||||
</div>
|
||||
<div id="follett" class="buch-element">
|
||||
<a href="https://www.thalia.de/shop/home/artikeldetails/A1067829823" target="_blank">Die Waffen
|
||||
des Lichts</a><br><br>
|
||||
Ken Follett<br>
|
||||
ca. 880
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#logo-container {
|
||||
background-color: cadetblue;
|
||||
width: 10%;
|
||||
height: 10%;
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#logo-container img {
|
||||
display: block;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#navbar-container {
|
||||
background-color: rgb(155, 207, 209);
|
||||
width: 90%;
|
||||
height: 10%;
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 10%;
|
||||
}
|
||||
|
||||
#navbar-container a,
|
||||
#navbar-container a:visited {
|
||||
float: left;
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
text-decoration: none;
|
||||
color: rgb(4, 60, 116);
|
||||
}
|
||||
|
||||
#navbar-container a:hover {
|
||||
background-color: rgb(225, 236, 236);
|
||||
}
|
||||
|
||||
.content-container {
|
||||
background-color: rgb(229, 228, 222);
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
left: 0%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.buch-element {
|
||||
float: left;
|
||||
background-color: rgb(210, 194, 168);
|
||||
height: 150px;
|
||||
width: 18%;
|
||||
padding: 1.5em 0;
|
||||
margin: 10px 1% 10px 1%;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 700px) {
|
||||
|
||||
#logo-container img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#navbar-container a,
|
||||
#navbar-container a:visited {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
.buch-element {
|
||||
float: none;
|
||||
width: 98%;
|
||||
position: static;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="02_styles_ellipsis.css">
|
||||
<title>Beispielseite</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="ellipsis">
|
||||
Dies ist ein sehr langer Text, der abgeschnitten wird.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
.ellipsis {
|
||||
width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Named Tags: Beispielseite</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#startseite">Startseite</a></li>
|
||||
<li><a href="#angebote">Angebote</a></li>
|
||||
<li><a href="#kontakt">Kontakt</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main id="startseite">
|
||||
<h1>Willkommen auf unserer barrierefreien Seite mit Named Tags</h1>
|
||||
<section id="angebote">
|
||||
<h2>Unsere Angebote</h2>
|
||||
<p>Hier findest du eine Übersicht unserer Dienstleistungen.</p>
|
||||
</section>
|
||||
<section id="kontakt">
|
||||
<h2>Kontakt</h2>
|
||||
<form>
|
||||
<label for="name">Name:</label>
|
||||
<input type="text" id="name" name="name" required>
|
||||
|
||||
<label for="email">E-Mail:</label>
|
||||
<input type="email" id="email" name="email" required>
|
||||
|
||||
<label for="nachricht">Nachricht:</label>
|
||||
<textarea id="nachricht" name="nachricht" rows="4" required></textarea>
|
||||
|
||||
<button type="submit">Absenden</button>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p>© 2025 Barrierefreie Beispielseite</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link href="04_styles_aria.css" rel="stylesheet">
|
||||
<title>Beispielseite</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Ohne ARIA: Screenreader erkennt das nicht als Button, nur als "klickbar" -->
|
||||
<div class="custom-button" tabindex="0" onclick="alert('Ohne ARIA: Aktion ausgelöst!')">
|
||||
Ohne ARIA absenden
|
||||
</div>
|
||||
|
||||
<!-- Mit ARIA: Screenreader erkennt das als "Taste" -->
|
||||
<div class="custom-button" role="button" tabindex="1" onclick="alert('Mit ARIA: Aktion ausgelöst!')">
|
||||
Mit ARIA absenden
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
.custom-button {
|
||||
float: left;
|
||||
background-color: #0078D4;
|
||||
color: white;
|
||||
padding: 0.6em 1.2em;
|
||||
font-size: 1rem;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
margin: 0px 5px;
|
||||
}
|
||||
|
||||
.custom-button:hover,
|
||||
.custom-button:focus {
|
||||
background-color: #005A9E;
|
||||
outline: 2px solid #005A9E;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.custom-button:active {
|
||||
background-color: #004578;
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
header,
|
||||
nav,
|
||||
main,
|
||||
footer {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
nav a {
|
||||
margin-right: 1rem;
|
||||
text-decoration: underline;
|
||||
color: #0055aa;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 1rem;
|
||||
background-color: #0055aa;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: 3px solid #ffaa00;
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link href="05_styles_voiceover.css" rel="stylesheet">
|
||||
<title>Screen Reader Demo</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1>Willkommen zur Screen Reader-Demo</h1>
|
||||
<p>Diese Seite zeigt, wie barrierefreies Webdesign mit Screenreader funktioniert.</p>
|
||||
</header>
|
||||
|
||||
<nav>
|
||||
<a href="#demo">Demo starten</a>
|
||||
<a href="#tipps">Tipps zur Bedienung</a>
|
||||
<a href="#bilddemo">Beispiel am Bild</a>
|
||||
<a href="#kontakt">Kontakt</a>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<section id="demo" aria-labelledby="demo-heading">
|
||||
<h2 id="demo-heading">Demo starten</h2>
|
||||
<p>Drücken Sie den folgenden Button, um eine Beispielaktion auszuführen:</p>
|
||||
<button onclick="alert('VoiceOver erkennt diesen Button und liest ihn korrekt vor.')">
|
||||
Aktion ausführen
|
||||
</button>
|
||||
</section>
|
||||
|
||||
<section id="tipps" aria-labelledby="tipps-heading">
|
||||
<h2 id="tipps-heading">Tipps zur Bedienung</h2>
|
||||
<ul>
|
||||
<li>VoiceOver aktivieren: Einstellungen → Bedienungshilfen → VoiceOver</li>
|
||||
<li>Navigation mit Wischgesten oder Tastatur</li>
|
||||
<li>Elemente werden vorgelesen, wenn sie fokussiert sind</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section id="bilddemo" aria-labelledby="bilddemo-heading">
|
||||
<h2 id="bilddemo-heading">Beispielbild mit barrierefreiem Alternativtext</h2>
|
||||
<figure>
|
||||
<img src="katze.jpg"
|
||||
alt="Eine schlafende schwarze Katze auf einem gemütlichen Bett. Dieses Bild soll positive Gefühle während einer anstrengenden Lehrveranstaltung auslösen."
|
||||
width="600" />
|
||||
<figcaption aria-hidden="true">
|
||||
Schlafende Katze auf einem gemütlichen Bett.
|
||||
</figcaption>
|
||||
</figure>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="kontakt" aria-labelledby="kontakt-heading">
|
||||
<h2 id="kontakt-heading">Kontakt</h2>
|
||||
<p>Bei Fragen zur Barrierefreiheit erreichen Sie mich unter:</p>
|
||||
<address>
|
||||
<a href="mailto:t.steger@hs-mannheim.de">t.steger@hs-mannheim.de</a>
|
||||
</address>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p>© 2025 Prof. T. Steger</p>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 317 KiB |
|
After Width: | Height: | Size: 319 KiB |
|
After Width: | Height: | Size: 292 KiB |
|
After Width: | Height: | Size: 36 KiB |