Title: Validation warning on buttons
Last modified: August 22, 2026

---

# Validation warning on buttons

 *  [bhkh](https://wordpress.org/support/users/bhkh/)
 * (@bhkh)
 * [1 week, 6 days ago](https://wordpress.org/support/topic/validation-warning-on-buttons/)
 * I’m getting the following type of Validation warning on a few buttons
 *     ```wp-block-code
       [WARNING] Line 594:18 - <button> is missing recommended "type" attribute (no-implicit-button-type) 
       ```
   
 * This is the button in that line:
 *     ```wp-block-code
       <button data-nav="site-navigation" class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
       ```
   
 * Is this something for the folks at GeneratePress to fix in the theme? I realize
   I could make a child theme and maybe fix these, but it would be better to have
   them fixed in the theme itself.
 * Or am I misunderstanding something? I used this validation tool: [https://validatehtml.com/validate-html5](https://validatehtml.com/validate-html5)
 * I’m using `GeneratePress Version: 3.6.1`

Viewing 1 replies (of 1 total)

 *  [George](https://wordpress.org/support/users/quantum_leap/)
 * (@quantum_leap)
 * [1 week, 6 days ago](https://wordpress.org/support/topic/validation-warning-on-buttons/#post-19000283)
 * Hello, 
   You can use this filter to fix the issue.
 * `add_filter( 'generate_parse_attr', function( $attributes, $context ) {
   if ( '
   menu-toggle' === $context ) {$attributes['type'] = 'button';}return $attributes;},
   10, 2 );
 * I will also flag it for our devs to have a look!

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fvalidation-warning-on-buttons%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [George](https://wordpress.org/support/users/quantum_leap/)
 * Last activity: [1 week, 6 days ago](https://wordpress.org/support/topic/validation-warning-on-buttons/#post-19000283)
 * Status: not resolved