• Priority: 0
  • Status: Waiting on customer
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 04.04.24, 18:01
  • Opened by: Cedric Casoni

Ticket #25463 - Custom Heading Levels for Accordion Widget in AMP

Hey Fred,

Hope you’re doing great! I’ve been diving into some accessibility and SEO optimization for our site and stumbled upon a little challenge with the Accordion widget in AMP. It’s currently using <h4> tags for the accordion titles, which isn’t quite fitting in with our content structure.

I was wondering if there’s a way to customize the heading level for the titles within the widget? Ideally, having the flexibility to choose the tag (like <h2>, <h3>, etc.) directly in the widget settings would be perfect. If that’s a bit of a stretch, I’d like to at least switch them to <h3>s to better align with our page hierarchy.

If it’s something not configurable through the widget settings at the moment, could you guide me through what changes I’d need to make to adjust this? I’m ready to get my hands dirty if you point me in the right direction.

Thks
Cédric

Comments

Fred 08 Apr 2024, 10:20

Hi Cédric.
It will take some time to add such feature into the widget.
You can change it quickly in the file modules/pkamp/views/templates/front/widgets/widget_ampaccordion.tpl

Cedric Casoni 08 Apr 2024, 11:05

Hello Fred,

Ok Thank you
Cédric

Fred 08 Apr 2024, 11:10

You are welcome!