Skip to content

Autocomplete: Must move inside iFrame for slash block insert #47767

@alexstine

Description

@alexstine

Description

When trying to insert a block with the /block name syntax, the list box is no longer read to screen readers. This is because the aria-owns and aria-activedescendent attributes contain IDs out of the current iFrame scope causing a null error.

Step-by-step reproduction instructions

  1. Open a post or page.
  2. Go to insert a block by typing in the empty paragraph field. Something like /ima should do.
  3. Arrow up and down.
  4. Check to see the field now has the 2 ARIA attributes as mentioned in the description above.
  5. Try to do a document.getElementByID() or document.querySelector() using the IDs from the ARIA attributes. The commands will return null.
    6.I believe this is because the Autocomplete component renders outside the iFrame. Needs a fix as this feature is completely broken for screen reader users.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress: 6.2-alpha-54678
Browser: Firefox
Screen reader: NVDA
OS: Windows 10 Professional

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

Yes

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

Yes

Metadata

Metadata

Labels

Needs DevReady for, and needs developer efforts[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Priority] HighUsed to indicate top priority items that need quick attention[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended[Type] RegressionRelated to a regression in the latest release

Type

No type

Projects

Status

Done 🎉

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions