Gutenberg: Sibling Inserter: "Add block" icon is accessible by keyboard but cannot be seen

Created on 1 Nov 2018  路  18Comments  路  Source: WordPress/gutenberg

Steps to reproduce:

  1. Create a new post and a few paragraph blocks.
  2. Place the cursor into one of the paragraph blocks.
  3. Press Shift+Tab until the "Add block" icon gets focus.

Result: I expected to see the "Add block" icon visually if I navigate to it from a paragraph block using the keyboard, but instead it is stuck behind the block toolbar. (20s)

screen shot 2018-10-31 at 7 45 15 pm
Seen at http://alittletestblog.com/wp-admin/post.php?post=15423&action=edit&revision=15425 running WordPress 4.9.8 and Gutenberg 4.2.0-rc.1 using Firefox 63.0 on macOS 10.13.6.

Accessibility (a11y) Needs Design [Type] Bug

All 18 comments

For reference, this is how it worked on Gutenberg 3.5 (the toolbar used to be shorter, without the "More" button):

3 5

And this is on Gutenberg 4.0: it was partially visible:

4 0

I can take a look at this today if no one has done so already

This may need design feedback now that the more button has been added to the toolbar. The Insert Block button overlaps it when it is focused.

Yep and there are a few more considerations that make this issue a bit more serious than it appeared at first sight:

1
Also when tabbing forwards (and the toolbar is not fully expanded yet), the button doesn't appear: only its tooltip is displayed:

screenshot 2018-11-03 at 11 44 55

2
When the block is selected, even when using the mouse the button is completely hidden behind the toolbar and can't be clicked:

screenshot 2018-11-03 at 11 51 28

3
When the inserter opens and then closes, focus must be moved back to the invoking context (the button). However, the button disappears so there's no place where the inserter popover can move focus back to. This produces a focus loss which needs to be avoided at all costs.

I'd kindly ask to give this issue some higher priority, as it appears to be not just a visual glitch.

Good catch. I'll play around with it more and see what I can find out. My guess is something else broke with the addition of that new menu. Maybe I can at least get it working consistently then it'll just be a matter of a new ux placement for it.

I think this was fixed by #11685?

@chrisvanpatten Yep this appears to be fixed already.

Great! I'll close this and if there's a regression or a browser compat issue or something else that pops up, we can reopen :)

The inserter button now appears but it's still hardly usable, as it's behind the toolbar 馃檪 Testing before closing an issue may help.

screenshot 2018-11-14 at 08 44 16

I鈥檓 sorry I interpreted Luke鈥檚 comment as confirmation the issue was fixed. Luckily with GitHub it鈥檚 painless and not a problem at all to reopen an issue even if a mistake is made.

@afercia @chrisvanpatten My apologies as well, I didn't realize that the fix only applied to blocks with shorter toolbars at the top!

We're still waiting on design feedback for this, right? The only semi-obvious solution that jumps out at me would be to hide the toolbar with the "add block" button is focused

If we change the z-index on the sibling inserter, we can get it to appear above the toolbar. I'm not fond of this solution and still trying to think through it.

zindex

If we change the z-index on the sibling inserter, we can get it to appear above the toolbar. I'm not fond of this solution and still trying to think through it.

Yeah, I agree 鈥斅爐his works, but it is less than ideal. I'm going to change this to Needs Design for now, while we're sorting out the best solution.

while we're sorting out the best solution.

I'd just like to kindly note this issue is waiting for a solution since 7 months.

The root cause is that this button was originally placed after the block (no problems there) and then moved _before_.

Its placement is not ideal for usability and accessibility as well. As a user, when I tab into a block I'd like to get to the content area as soon as possible. Instead, the first thing in the source order within the block is this "Add block" button which doesn't make much sense from a work flow perspective. Not to mention that for keyboard and screen reader users, it doesn't really make sense.

The root cause is that this button was originally placed after the block (no problems there) and then moved before.

I'm in favor of exploring a solution that moves this below the block. We just need to be weary about how and when this inserter icon appears. I've run into times when it covers a toolbar link that I'm trying to get to as well.

I made #13571, which suggests an overhaul to the sibling inserter that would fix this issue.

I believe this was fixed in #19596:

2020-03-16 12-57-00 2020-03-16 12_57_38

The sibling inserter is no longer blocked by the toolbar.

Was this page helpful?
0 / 5 - 0 ratings