| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | * @package WordPress |
| 7 | 7 | * @since 6.9.0 |
| 8 | 8 | * |
| 9 | 9 | * @param array{ openByDefault: bool } $attributes The block attributes. |
| 10 | - * @param string $content The block content. | |
| 10 | + * @param string $content The block content. | |
| 11 | 11 | * @return string Returns the updated markup. |
| 12 | 12 | */ |
| 13 | 13 | function gutenberg_block_core_accordion_item_render( array $attributes, string $content ): string { |
| 14 | 14 | if ( '' === $content ) { |
| @@ -45,9 +45,10 @@ | ||
| 45 | 45 | |
| 46 | 46 | if ( $p->next_tag( array( 'class_name' => 'wp-block-accordion-panel' ) ) ) { |
| 47 | 47 | $p->set_attribute( 'id', $unique_id . '-panel' ); |
| 48 | 48 | $p->set_attribute( 'aria-labelledby', $unique_id ); |
| 49 | - $p->set_attribute( 'data-wp-bind--inert', '!state.isOpen' ); | |
| 49 | + $p->set_attribute( 'data-wp-bind--hidden', 'state.isHidden' ); | |
| 50 | + $p->set_attribute( 'data-wp-on--beforematch', 'actions.handleBeforeMatch' ); | |
| 50 | 51 | |
| 51 | 52 | // Only modify content if all directives have been set. |
| 52 | 53 | $content = $p->get_updated_html(); |
| 53 | 54 | } |