refactor: Update schema.org markup for FAQ dropdown

- Changed the itemtype from "https://schema.org/QAPage" to "https://schema.org/Question"
- Removed unnecessary itemprop attribute from summary element
- Added "suggestedAnswer" itemprop attribute to the answer element

These changes improve the accuracy and consistency of the schema.org markup for the FAQ dropdown component.
This commit is contained in:
Rico van Zelst
2023-12-14 14:57:58 +01:00
parent 68d905ee42
commit c15c4d640f

View File

@@ -1,7 +1,6 @@
<div class="py-5" itemscope itemtype="https://schema.org/QAPage"> <div class="py-5" itemscope itemtype="https://schema.org/Question">
<details class="group"> <details class="group">
<summary class="flex justify-between items-center font-medium cursor-pointer list-none" itemprop="mainEntity" <summary class="flex justify-between items-center font-medium cursor-pointer list-none">
itemscope itemtype="https://schema.org/Question">
<span class="text-orange-400" itemprop="name">{{$question}}</span> <span class="text-orange-400" itemprop="name">{{$question}}</span>
<span class="transition text-orange-400 group-open:rotate-180"> <span class="transition text-orange-400 group-open:rotate-180">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" <svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor"
@@ -10,7 +9,7 @@
</svg> </svg>
</span> </span>
</summary> </summary>
<div itemprop="acceptedAnswer" itemscope itemtype="https://schema.org/Answer"> <div itemprop="acceptedAnswer suggestedAnswer" itemscope itemtype="https://schema.org/Answer">
<p class="text-gray-100 mt-3" itemprop="text"> <p class="text-gray-100 mt-3" itemprop="text">
{!! $answer !!} {!! $answer !!}
</p> </p>