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

Iframe: Body tag can receive negative tabindex impacting screen reader A11Y #46258

Closed
alexstine opened this issue Dec 1, 2022 · 0 comments · Fixed by #46323
Closed

Iframe: Body tag can receive negative tabindex impacting screen reader A11Y #46258

alexstine opened this issue Dec 1, 2022 · 0 comments · Fixed by #46323
Assignees
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Accessibility Feedback Need input from accessibility Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended

Comments

@alexstine
Copy link
Contributor

Description

When I enter the block toolbar and return from it, the screen reader reads all blocks in the block list until it reaches the focus point of the selected block. This is because the focus passes through a tabindex="-1" on the body tag of the iFrame.

I have a feeling removing this attribute may not be straight forward. Could be tied in with writing flow and it is also possible that removing the attribute could break focus styles inside the body tag.

Step-by-step reproduction instructions

  1. Start a screen reader such as NVDA on Windows.
  2. Open the site editor.
  3. Select a block, second or third one in the list should do.
  4. Press shift+tab to focus the block toolbar.
  5. Press tab to focus the current block.
  6. Notice how the first blocks are read by the screen reader until the block you currently have focus on is reached.

I believe this generally happens because tabindex="-1" is not a tabbable index. The screen reader has no choice but to enter it because the content within is tabbable but it likely gets confused. You can always focus -1 but not tab to it.

Screenshots, screen recording, code snippet

No response

Environment info

Gutenberg: trunk
Browser: Firefox/Google Chrome
Screen reader: NVDA
OS: Windows 10

Probably able to reproduce in other environments as well.

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

@alexstine alexstine added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Dev Ready for, and needs developer efforts Needs Accessibility Feedback Need input from accessibility labels Dec 1, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 6, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Accessibility Feedback Need input from accessibility Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants