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

Site editor: Site icon moves off-screen when tabbing through the UI #51257

Closed
afercia opened this issue Jun 6, 2023 · 1 comment · Fixed by #51279
Closed

Site editor: Site icon moves off-screen when tabbing through the UI #51257

afercia opened this issue Jun 6, 2023 · 1 comment · Fixed by #51279
Assignees
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@afercia
Copy link
Contributor

afercia commented Jun 6, 2023

Description

Turns out the addition of the 'View site' link to the site hub in the site editor, see #50420, broke the layout when tabbing with teh keyboard trough the UI. See animated GIF:

tabbing

When the navigation panel is closed, the 'View site' link is stil focusable and can be tabbed to. Instead, I think it should not be rendered. It should work like the 'Open command center' button, which is rendered conditionally only in the 'view' mode. See

<Button
href={ homeUrl }
target="_blank"
label={ __( 'View site' ) }
aria-label={ __( 'View site (opens in a new tab)' ) }
icon={ external }
className="edit-site-site-hub__site-view-link"
/>
</HStack>
{ canvasMode === 'view' && (
<Button
className="edit-site-site-hub_toggle-command-center"
icon={ search }
onClick={ () => openCommandCenter() }
label={ __( 'Open command center' ) }
/>
) }

Cc @glendaviesnz

Step-by-step reproduction instructions

  • Go to the Site editor.
  • Use the Tab key to navigate to the canvas overlay.
  • Press Enter to switch the editor to Edit mode.
  • Press the Tab key once: focus goes to the first block. Not sure this is OK but it's a separate issue.
  • Keep pressing the Tab key to navigate through the entire UI and start from scratch.
  • Or Press Shift + Tab to navigate backwards.
  • Observe that the 'View site' link is still focusable. It stays not visible, only the tooltip is visible.
  • Observe that when the 'View site' link receives focus, the Site icon button moves off-screen and the layout breaks.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

@afercia afercia added [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release [a11y] Keyboard & Focus [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Jun 6, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 6, 2023
@glendaviesnz
Copy link
Contributor

Thanks @afercia for spotting this and suggesting a fix. I have added a PR here.

@priethor priethor added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). and removed [a11y] Keyboard & Focus [Status] In Progress Tracking issues with work in progress labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants