Skip to content

Commit

Permalink
Fix: Use <h2> for comments title and form to improve a11y & SEO (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
rami-elementor authored Jul 24, 2024
1 parent 973dd46 commit f046b3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<section id="comments" class="comments-area">

<?php if ( have_comments() ) : ?>
<h3 class="title-comments">
<h2 class="title-comments">
<?php
$comments_number = get_comments_number();
if ( '1' === $comments_number ) {
Expand All @@ -46,7 +46,7 @@
);
}
?>
</h3>
</h2>

<?php the_comments_navigation(); ?>

Expand All @@ -69,8 +69,8 @@
<?php
comment_form(
[
'title_reply_before' => '<h3 id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</h3>',
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</h2>',
]
);
?>
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Source: https://stocksnap.io/photo/4B83RD7BV9

== Changelog ==

= 3.1.1 - 2024-07-xx =
* Fix: Use consistent `<h2>` for comments title and comment form

= 3.1.0 - 2024-06-19 =
* Tweak: Update `Requires PHP 7.4`
* Tweak: Update `Tested up to 6.5`
Expand All @@ -49,7 +52,7 @@ Source: https://stocksnap.io/photo/4B83RD7BV9
* Fix: Single post renders redundant wrapping `<div>` when it has no tags
* Fix: Remove redundant wrapping `<div>` from `wp_nav_menu()` output
* Fix: Wrap page `<h1>` with `<div>`, not `<header>`
* Fix: Uses consistent `<h3>` for comments title and comment form
* Fix: Use consistent `<h3>` for comments title and comment form
* Fix: Remove heading tags from dynamic header/footer
* Fix: Mobile Menu hamburger is not visible for logged-out users in some cases ([#369](https://github.com/elementor/hello-theme/issues/369))
* Fix: Remove duplicate ID attributes in the header mobile menu
Expand Down

0 comments on commit f046b3a

Please sign in to comment.