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

Focus on the Title block only works the first time you edit a content. #6781

Open
sneridagh opened this issue Feb 25, 2025 · 3 comments
Open
Labels
01 type: bug 30 needs: triage New issue that needs confirmation before work begins
Milestone

Comments

@sneridagh
Copy link
Member

Describe the bug
The editor has a feature that on edit, the initial focus goes to the Title block. This is only true the first time you edit any content, then the subsequent edits, the focus is not there.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any content as admin
  2. Click on Edit
  3. The title block is focused correctly.
  4. Save, or cancel.
  5. Edit again
  6. The title block is no longer focused.

Expected behavior
The title block is focused all the subsequent times you edit a content.

Software (please complete the following information):

Present in https://demo.plone.org

/cc @tisto @plone/volto-accessibility

@sneridagh sneridagh added 01 type: bug 30 needs: triage New issue that needs confirmation before work begins labels Feb 25, 2025
@sneridagh sneridagh added this to the 19.x.x milestone Feb 28, 2025
@JeffersonBledsoe
Copy link
Member

Some accessibility background on this:

The WCAG criteria autofocus is most relevant to is SC 2.4.3 - Focus Order (Level A), with the key part being:

ensure that when users navigate sequentially through content, they encounter information in an order that is consistent with the meaning of the content

Autofocus can be confusing for non-visual users such as those with a screenreader, as you skip over all the information which may have come before it and lose context. Because of this ambiguity, it would ultimately be up to the interpretation of the auditor on whether this passed SC 2.3.4 or not.

The WAI ARIA Best Practise guidelines for keyboard interfaces has a comment about auto-focus:

Do not set initial focus when the page loads except in cases where:

  • The page offers a single, primary function that nearly all users employ immediately after page load.
  • Any given user is likely to use the page often.

Based on the above, we would have to decide whether the information prior to the title block is relevant to everybody or not and that would be the deciding factor for the accessibility of this. Another consideration is whether you would want different behaviour between adding content and editing existing content, as you're much more likely to understand the context of why the focus is on a title field after pressing "Add" (as whatever you are adding would need a title) than if you were to try and edit something (which already has a title and so you might not want to be changing it).

TLDR: It's definitely worth fixing this bug so the behaviour is consistent, but the actual autofocus behaviour needs some research.

@shashank0470
Copy link

Is this issue still open , if yes can you assign this to me?

@stevepiercy
Copy link
Collaborator

Suspended @shashank0470 for 1 day because they did not read the description of the issue or follow contributing guidelines.

@shashank0470 please use this time to first read and follow First-time contributors, especially Things not to do, Contributing to Plone, and Contributing to Volto.

Using your super power of observation, you may see that the green "Open" icon reflects its status. See GitHub docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 type: bug 30 needs: triage New issue that needs confirmation before work begins
Projects
Status: No status
Development

No branches or pull requests

4 participants