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: frame resizing is not keyboard accessible #51267

Closed
afercia opened this issue Jun 6, 2023 · 9 comments · Fixed by #52443
Closed

Site editor: frame resizing is not keyboard accessible #51267

afercia opened this issue Jun 6, 2023 · 9 comments · Fixed by #52443
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). [Package] Edit Site /packages/edit-site [Priority] High Used to indicate top priority items that need quick attention [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

In the Site Editor, the new 'Frame resizing' introduced in #49910 is not operable with the keyboard.

I do realize the new resizing functionality works pretty differently from the previous implementation. Anyways, the previous resizing feature used the ResizeHandle and, while not perfect, it was operable with the keyboard. The new functionality is not.

As a keyboard user, I can't resize the editor iframe.

I would like to kindly remind everyone that any feature must be operable with the keyboard. Or, there must be an alternative way to use a feature that is keyboard accessible. I couldn't find any way to resize the iframe by using the keyboard so I'd call this an accessibility regression.

Quickly scanning the related PR #49910 I couldn't see any consideration about accessibility and keyboard interaction, which is a bit disheartening to be honest.

Additionally:

  • The "Drag to resize" string is not translatable.
  • That string is used to render a HTML title attribute on the draggable div element. For a number of years, WordPress has been progressively removing title attributes from the UI because they serve litle purpose and are accessible to only a minority of users. See https://core.trac.wordpress.org/query?keywords=~title-attribute
    We should never introduce new title attributes and use Tooltips instead.

Step-by-step reproduction instructions

  • Go to the Site Editor.
  • Stay in the initial view, with the Navigation panel on the left and the editor canvas on the right.
  • Hover between the panel and the canvas.
  • Observe a 'drag handle' appears. While hovering, a title attribute shows up, with the text 'Drag to resize'.
  • Use the keyboard and try to na igate to the drag handle.
  • Observe the drag handle doesn't appear (it's not focusable anyways).
  • Try to find an alternative way to resize the iframe by using only the keyboard.
  • Observe there is no way to resize the iframe with the keyboard.

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 [Package] Edit Site /packages/edit-site [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Jun 6, 2023
@annezazu
Copy link
Contributor

annezazu commented Jun 7, 2023

Thanks for opening this and reporting! This used to work #47176 but I know some aspects were recently iterated upon: #49910 cc @youknowriad and @SaxonF

@ndiego ndiego moved this to ❓ Triage in WordPress 6.3.x Editor Tasks Jun 12, 2023
@ndiego ndiego moved this from ❓ Triage to 📥 Todo in WordPress 6.3.x Editor Tasks Jun 14, 2023
@joedolson
Copy link
Contributor

Is there anything this needs to move forward? This is a pretty major keyboard regression, and it doesn't seem like there's a lot of movement on it right now.

@alexstine alexstine added the [Priority] High Used to indicate top priority items that need quick attention label Jun 30, 2023
@annezazu
Copy link
Contributor

annezazu commented Jul 3, 2023

Right now, the best bet is that it's in the 6.3 board as to do already. Riad already commented on the initial PR here linking this issue: #49910 (comment) @SaxonF pinging you again just in case.

@ramonjd
Copy link
Member

ramonjd commented Jul 4, 2023

I had a spare few moments, and tried to wrangle the Resize Handler into the ResizableFrame without much success.

Keyboard navigation sort of works, but the width calculations are extensive and probably need to be ported over to any keyboard events. Maybe folks who worked on it would have better and faster success than I.

@youknowriad
Copy link
Contributor

@ramonjd Can't we just restore what we had before that PR? https://github.com/WordPress/gutenberg/pull/49910/files

@ramonjd
Copy link
Member

ramonjd commented Jul 4, 2023

Yeah, looks like we could roll back packages/edit-site/src/components/layout/index.js. useIsSiteEditorLoading() will still come in handy I suppose.

A lot of code/effort went into #49910 so I was hoping someone with more knowledge of the changes, e.g., @mirka, might have an idea to patch it before we do that.

@ramonjd
Copy link
Member

ramonjd commented Jul 5, 2023

Can't we just restore what we had before that PR?

I've taken a stab here:

There's a lot going on /layout/index.js so I tried to revert and merge as best as I could with eyeballs.

@mirka
Copy link
Member

mirka commented Jul 7, 2023

Apologies for missing this on the first pass! My bad. I think I figured out a way to add back keyboard operability, so I will propose a patch shortly.

@mirka mirka self-assigned this Jul 7, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 8, 2023
@ramonjd
Copy link
Member

ramonjd commented Jul 9, 2023

Thanks @mirka, I'll close my revert PR. 🙇🏻

@tellthemachines tellthemachines moved this from 🔎 Needs Review to 🏗️ In Progress in WordPress 6.3.x Editor Tasks Jul 11, 2023
@github-project-automation github-project-automation bot moved this from 🏗️ In Progress to ✅ Done in WordPress 6.3.x Editor Tasks Jul 13, 2023
@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). [Package] Edit Site /packages/edit-site [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
No open projects
8 participants