WordPress / theme-experiments

Experimenting with themes made out of blocks.
GNU General Public License v2.0
546 stars 179 forks source link

Use HTML5 semantic markup for comments #245

Closed andersnoren closed 3 years ago

andersnoren commented 3 years ago

The Post Comments block currently only outputs the HTML5 version of the comments list and the comment form if set to do so with add_theme_support(), so this should probably be in functions.php for more semantic markup:

// HTML5 semantic markup.
add_theme_support( 'html5', array( 'comment-form', 'comment-list' ) );

...although I think all FSE blocks should output the HTML5 versions of the markup, regardless of whether the theme has add_theme_support( 'html5', array() ) set or not.

kjellr commented 3 years ago

I think all FSE blocks should output the HTML5 versions of the markup, regardless of whether the theme has add_theme_support( 'html5', array() ) set or not.

Thanks for noticing! I agree that this should be fixed in Gutenberg. I've filed https://github.com/WordPress/gutenberg/issues/30502 to keep track of that. If for some reason folks decide it doesn't make sense to handle this there, we can always reopen this issue.