Clear All Button

A generic "reset every active filter at once" control. Renders template-parts/atoms/clear-all-button.

label and aria_label are deliberately separate — the visible text stays short by design, while the accessible name stays unambiguous out of context for screen reader users. A real <button>, not a link — it resets in-page state rather than navigating. Used by the Insights Block's active-filters bar next to a row of Filter Chips — blocks/insights/script.js's own renderActiveFilters() builds this same markup dynamically rather than calling this template part directly (client JS can't call PHP).

Default

Playground

Change a value below to update the preview live.

Usage

get_template_part( 'template-parts/atoms/clear-all-button', null, [
    'label'      => 'Clear All',        // optional, defaults to 'Clear All'
    'aria_label' => 'Clear all filters', // optional, defaults to 'Clear all filters'
    'classes'    => '', // optional, appended alongside the clear-all-button class
] );