diff options
| author | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-03 15:17:36 +0200 |
|---|---|---|
| committer | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-03 15:17:36 +0200 |
| commit | f0b54bdde0ba73acdcb7bd2bf6fbe5e3b79b5dbb (patch) | |
| tree | 164e2dfc76275421f2ffa2b61d1a8284ec75a8cb /views | |
| parent | 7f42e591329eda931c17826b713202ef9afd546d (diff) | |
Produktseite: benannte Abschnitte nur beim Hauptprodukt
Ähnliche und eingebettete Produkte geben ihre Abschnitte ohne Landmarke aus, damit Namen nicht doppelt vorkommen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'views')
| -rw-r--r-- | views/produktseite/produkt.phtml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/views/produktseite/produkt.phtml b/views/produktseite/produkt.phtml index a5ec0ad..962c359 100644 --- a/views/produktseite/produkt.phtml +++ b/views/produktseite/produkt.phtml @@ -395,10 +395,11 @@ <?php /* Langtext, Zusätzliche Informationen und Lieferumfang je als Abschnitt mit H2 (Punkt 8.7) START */ ?> <?php foreach (['longdescription' => __('Beschreibung', 'wpsg'), 'moreinfos' => __('Zusätzliche Informationen', 'wpsg'), 'moreinfos2' => __('Lieferumfang', 'wpsg')] as $field => $title) { ?> <?php if (trim((string)($this->view['data'][$field]??'')) === '') continue; $section_id = 'wpsg-product-'.$field.'-'.$this->getTemplateIndex(); ?> - <section class="wpsg-product__section wpsg_produkt_<?php echo esc_attr($field); ?>" aria-labelledby="<?php echo esc_attr($section_id); ?>"> + <?php /* Benannte Landmarke nur beim Hauptprodukt; nachgeordnete Produkte hätten sonst gleichnamige (axe landmark-unique) */ $section_tag = (($bMainProduct)?'section':'div'); ?> + <<?php echo $section_tag; ?> class="wpsg-product__section wpsg_produkt_<?php echo esc_attr($field); ?>"<?php if ($bMainProduct) { ?> aria-labelledby="<?php echo esc_attr($section_id); ?>"<?php } ?>> <h<?php echo $nSectionLevel; ?> id="<?php echo esc_attr($section_id); ?>" class="wpsg-product__section-title"><?php echo esc_html($title); ?></h<?php echo $nSectionLevel; ?>> <div<?php echo (($field === 'longdescription')?' itemprop="description"':''); ?>><?php echo $this->view['data'][$field]; ?></div> - </section> + </<?php echo $section_tag; ?>> <?php } ?> <?php /* Abschnitte ENDE */ ?> |
