Skip to content

Focus moves inside of collapsed accordion #1779

@starryeyez024

Description

@starryeyez024

Description of the issue

When the keyboard is used to move the focus through a webpage, the focus should not move onto links which are hidden from view.

Expected behavior

The pfe-accordion has collapsed panels which contain links, and so the focus should only move to each heading (and past the hidden links), unless the panel is expanded & visible.

Impacted component(s)

  • pfe-accordion

Steps to reproduce

  1. Go to https://patternflyelements.com/components/accordion/
  2. Click on the Accordion heading at the top of the page (to skip the nav)
  3. Hit the tab key several times.
  4. Notice that the first accordion header is focused, and then the next time you hit the tab key the focus disappears. This is because it's focused on a link within the first panel. When you hit tab again, the focus will move to the second accordion header.

Screenshots

image

(the link in the bottom left is an empty anchor link within the hidden panel)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions