Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block Patterns - Tabbing through patterns triggers a toolbar attached to the sidebar. #44042

Closed
Addison-Stavlo opened this issue Jul 9, 2020 · 7 comments
Assignees
Labels
[Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Pri] Normal [Type] Bug

Comments

@Addison-Stavlo
Copy link
Contributor

Tabbing through our custom block patterns will trigger a toolbar that is attached to the sidebar inserter. This does not seem to be reproducible with core patterns and is observed on both 8.3 and edge stickered sites.

  • Load into the editor.
  • Open the inserter via the "+" button on the top left.
  • select the 'patterns' tab.
  • "Tab" to cycle down the list of patterns.
  • 1/3 of the way down the list or so you should notice a toolbar that has been triggered.

patterns-toolbar

@Addison-Stavlo Addison-Stavlo added [Pri] Normal [Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Type] Bug labels Jul 9, 2020
@yansern
Copy link
Contributor

yansern commented Aug 6, 2020

This is because the <Disabled> component doesn't prevent <a> tags within block preview from being focusable when tabbed over. This also caused block toolbar to activate on the <a> elements within the block preview.

@yansern
Copy link
Contributor

yansern commented Aug 6, 2020

PR here: WordPress/gutenberg#24397

@Addison-Stavlo
Copy link
Contributor Author

Addison-Stavlo commented Aug 6, 2020

Great catch! I wonder if this underlying issue may be related to #44038 as well. I remember that error being seemingly related to to the pattern having CTA buttons or tags near the top. 🤔

@razvanpapadopol
Copy link

PR was fixed and included in Gutenberg 8.8 milestone. This needs to be retested when the new plugin version lands on edge sites.

@david-szabo97
Copy link
Contributor

This PR WordPress/gutenberg#24397 is causing infinite loops for me (keeps adding-removing tabindex).
Filed a PR to fix it: WordPress/gutenberg#24935

@david-szabo97
Copy link
Contributor

Even after the WordPress/gutenberg#24935 PR this is still happening.
Also, we have a new pattern called YouTube Embed. Focus goes into this specific pattern. When tabbing, focus is going through the YouTube iframe's elements.

@Addison-Stavlo
Copy link
Contributor Author

Closing this issue as it seems to have been fixed in Gutenberg. I am no longer able to repro and tabbing through patterns works as expected regardless of their content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Pri] Normal [Type] Bug
Projects
None yet
Development

No branches or pull requests

4 participants