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

Content Structure dropdown remains open after focus moves to page #15323

Closed
karlgroves opened this issue Apr 30, 2019 · 3 comments
Closed

Content Structure dropdown remains open after focus moves to page #15323

karlgroves opened this issue Apr 30, 2019 · 3 comments
Labels
[Feature] Document Outline An option that outlines content based on a title and headings used in the post/page [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).

Comments

@karlgroves
Copy link

Content Structure dropdown remains open after focus moves to page

  • Severity: High
  • Affected Populations:
    • Low-Vision
    • Motor Impaired
    • Cognitively Impaired
  • Platform(s):
    • All / Universal
  • Components affected:
    • Structure and Navigation

Issue description

When users open the "Block Navigation" dropdown and click on an
element, the dropdown closes and focus can be seen on which Block was
selected. However, when users open the Content Structure dropdown and
click on an element, the dropdown remains open while focus moves to the
specified block. The open dropdown obscures the focussed element, and
the Escape key can no longer close the dropdown.

Obscuring the focus position is potentially confusing for sighted
keyboard users, since it may appear as though no item has focus, or make
it unclear as to where the focus position is.

Remediation Guidance

Depending on the reason why the Content Structure remains open, there
are two potential solutions:

  1. If the idea is to keep the document outline open while users' focus
    is on the page, then shrinking the page's width so that the open
    dropdown is on the left while the page is on the right (without
    horizontal scrollbars on non-zoomed desktops at least) allows users to
    view both the outline and their current focus position.
  2. Otherwise, the dropdown should close as the "Block Navigation"
    does, so that focus on the page element is clearly identifiable.

Relevant standards

Note: This issue may be a duplicate with other existing accessibility-related bugs in this project. This issue comes from the Gutenberg accessibility audit, performed by Tenon and funded by WP Campus. This issue is GUT-27 in Tenon's report

@gziolo gziolo added the Needs Accessibility Feedback Need input from accessibility label Apr 30, 2019
@melchoyce
Copy link
Contributor

Screenshot from full report:

image

@melchoyce melchoyce added the [Feature] Document Outline An option that outlines content based on a title and headings used in the post/page label May 4, 2019
@afercia
Copy link
Contributor

afercia commented May 5, 2019

Related to the popover component, see also #15332:

anything which moves the keyboard focus out of the dropdown (such as a voice action, or Tab navigation away from it) should close the dropdown.

@afercia afercia added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). and removed Needs Accessibility Feedback Need input from accessibility labels May 5, 2019
@marekhrabe
Copy link
Contributor

I believe this is no longer an issue, as this functionality was introduced as part of #10815. I have tested on the current master branch with both mouse and keyboard interactions and the dropdown now closes after selecting a link.

Introduced in panel.js here: https://github.com/WordPress/gutenberg/pull/10815/files#diff-1a7e4ec3ae945524348fcd77315f8dd0

Feel free to reopen if I missed the point of this issue and it still needs to be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Document Outline An option that outlines content based on a title and headings used in the post/page [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

No branches or pull requests

6 participants