Skip to content

FAQ with helpfulness vote

A native accordion FAQ where each answer asks “Was this answer helpful?”, with a thank-you message and a remembered vote.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

Each question opens and closes as a native details element (keyboard, screen readers and in-page search work out of the box). Under the answer, Yes and No buttons collect the visitor’s opinion: a thank-you shows at once, different for each answer, and the vote can be changed. It is remembered in the browser, so returning visitors see they have already answered. The buttons form a group named by the question “Was this answer helpful?”, show their state with aria-pressed, and the thank-you is announced by a role="status" region. To use the votes, just add a call to your analytics tool in the click handler. Without JavaScript the FAQ works and the vote buttons stay hidden. 44 px targets, AA contrast in light and dark mode, an arrow animated only without prefers-reduced-motion. Example: a bike rental in La Rochelle.

Code

Loading the code…

The code of this component in

Archive contents

faq-vote-utile-html-tailwind.zip3 files · 5 Ko

  • index.html13 Ko
  • README.md4 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 3, 2026.

Reviews

No reviews yet.

In the same spirit

  • Dark chevron FAQ

    Coming soon

    An accordion on a dark background, rounded cards and a chevron rotating on open.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Searchable FAQ

    Coming soon

    A field that filters questions as you type, for large FAQs.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • An introduction and a contact link on the left, expandable questions on the right.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A tight accordion within a single frame, for practical information pages.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component