WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.46k stars 4.17k forks source link

Buttons without link have empty <a> tag, use <div> instead #65421

Open sethmclellana8c opened 4 weeks ago

sethmclellana8c commented 4 weeks ago

Description

Buttons without a link set currently have an empty <a> tag. But it should default to not having that tag at all and just use a <div>.

Step-by-step reproduction instructions

  1. I spun up a demo site on instawp.io and the default Twenty Twenty-Four theme was active.
  2. Went through the first checks for accessibility.
  3. Tabbed through the homepage to do the check for "Keyboard navigation"
  4. Tabbing through the homepage hits the top elements on the page, but skips the "About us" button in top section.
  5. Talked with @amberhinds and she suggested this isn't an accessibility fail, but rather an improvement to the block logic

Screenshots, screen recording, code snippet

No response

Environment info

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

carolinan commented 3 weeks ago

@sethmclellana8c HI, can you please update the description with the explanation why the empty <a> tag should be replaced with a <div>.

amberhinds commented 3 weeks ago

@carolinan this is related to @joedolson's comment on https://github.com/WordPress/gutenberg/issues/63534.

carolinan commented 3 weeks ago

I am not asking for myself. Any request for a change will be easier to consider if it has a motivation and explanation. Let's not make the assumption that all contributors understand what the problem is and why it needs to change.