fix: resolve HTML hierarchy, accessibility and PDF link issues
Some checks failed
🚀 Build & Deploy / 🔍 Prepare (push) Successful in 7s
🚀 Build & Deploy / 🧪 QA (push) Successful in 1m19s
🚀 Build & Deploy / 🏗️ Build (push) Successful in 11m30s
🚀 Build & Deploy / 🚀 Deploy (push) Successful in 12s
🚀 Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 2m45s
🚀 Build & Deploy / 🔔 Notify (push) Successful in 2s
Nightly QA (Inlined) / 🏗️ Prepare & Install (push) Successful in 6m54s
Nightly QA (Inlined) / 🔍 Static Analysis (push) Failing after 1m29s
Nightly QA (Inlined) / 🧪 Maintenance & Links (push) Failing after 1m38s
Nightly QA (Inlined) / ♿ Accessibility (push) Successful in 2m0s
Nightly QA (Inlined) / 🎭 Lighthouse (push) Failing after 2m2s
Nightly QA (Inlined) / 🔔 Notify (push) Successful in 1s
Some checks failed
🚀 Build & Deploy / 🔍 Prepare (push) Successful in 7s
🚀 Build & Deploy / 🧪 QA (push) Successful in 1m19s
🚀 Build & Deploy / 🏗️ Build (push) Successful in 11m30s
🚀 Build & Deploy / 🚀 Deploy (push) Successful in 12s
🚀 Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 2m45s
🚀 Build & Deploy / 🔔 Notify (push) Successful in 2s
Nightly QA (Inlined) / 🏗️ Prepare & Install (push) Successful in 6m54s
Nightly QA (Inlined) / 🔍 Static Analysis (push) Failing after 1m29s
Nightly QA (Inlined) / 🧪 Maintenance & Links (push) Failing after 1m38s
Nightly QA (Inlined) / ♿ Accessibility (push) Successful in 2m0s
Nightly QA (Inlined) / 🎭 Lighthouse (push) Failing after 2m2s
Nightly QA (Inlined) / 🔔 Notify (push) Successful in 1s
- Fix heading level skip in ContactContent success state (H3 -> H2) - Clean up deprecated iframe attributes in ContactContent - Add aria-label to footer logo link for WCAG compliance - Rename PDF assets to hyphenated filenames to fix link checks - Update AGB page with new PDF link format
This commit is contained in:
@@ -13,22 +13,27 @@ export default function AVB() {
|
||||
.filter((b) => b !== "");
|
||||
|
||||
// Extract title and stand more robustly
|
||||
const title = rawBlocks.find(b => b.startsWith("# "))?.replace(/^#\s+/, "") || "Allgemeine Verkaufsbedingungen";
|
||||
const stand = rawBlocks.find(b => b.toLowerCase().startsWith("stand:")) || "Stand: April 2026";
|
||||
const title =
|
||||
rawBlocks.find((b) => b.startsWith("# "))?.replace(/^#\s+/, "") ||
|
||||
"Allgemeine Verkaufsbedingungen";
|
||||
const stand =
|
||||
rawBlocks.find((b) => b.toLowerCase().startsWith("stand:")) ||
|
||||
"Stand: April 2026";
|
||||
|
||||
const sections: { title: string; content: string[] }[] = [];
|
||||
let currentSection: { title: string; content: string[] } | null = null;
|
||||
|
||||
// Process sections, skipping title and stand blocks
|
||||
rawBlocks.forEach((block) => {
|
||||
if (block.startsWith("# ") || block.toLowerCase().startsWith("stand:")) return;
|
||||
if (block.startsWith("# ") || block.toLowerCase().startsWith("stand:"))
|
||||
return;
|
||||
|
||||
if (block.startsWith("##")) {
|
||||
// New section header: e.g. "## 1. Geltungsbereich"
|
||||
if (currentSection) sections.push(currentSection);
|
||||
currentSection = {
|
||||
title: block.replace(/^##\s+/, "").trim(),
|
||||
content: []
|
||||
currentSection = {
|
||||
title: block.replace(/^##\s+/, "").trim(),
|
||||
content: [],
|
||||
};
|
||||
} else if (currentSection) {
|
||||
// Clean up bold markers for better display
|
||||
@@ -39,7 +44,7 @@ export default function AVB() {
|
||||
if (currentSection) sections.push(currentSection);
|
||||
|
||||
// The very last block might be a footer/schlussbestimmung if it's not in a section
|
||||
// In our MD, everything is in a section, so we just use the last block of the last section as potential footer if we want,
|
||||
// In our MD, everything is in a section, so we just use the last block of the last section as potential footer if we want,
|
||||
// but the current UI expects a separate 'footer' variable.
|
||||
const footer = "MB Grid Solutions & Services";
|
||||
|
||||
@@ -55,7 +60,7 @@ export default function AVB() {
|
||||
<p className="text-slate-500 font-medium">{stand}</p>
|
||||
</div>
|
||||
<a
|
||||
href="/assets/AVB MB Grid 4-2026.pdf"
|
||||
href="/assets/avb-mb-grid-4-2026.pdf"
|
||||
download
|
||||
className="btn-primary !py-3 !px-6 flex items-center gap-2"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user