patternfly / patternfly/patternfly-react

Bug - Notification Drawer should allow focus trap

Open
#11,703 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Stale
Dominant language
TypeScript
Stars
862
Forks
392
Avg merge
4d 8h
Merged PRs (30d)
9

Description

Describe the problem
A clear and concise description of the problem. Which pages are affected?

When using a keyboard to navigate the page in https://www.patternfly.org/components/notification-drawer/react-demos/basic/, keyboard focus is given to the first button or link in the drawer, which is correct.

However, when a user goes and closes the notification drawer, keyboard focus does not return to the notification button, and seems to return to the browser chrome, which is disorienting.

Moreover, after tabbing to the last item in the notification drawer, the next tab press should loop back to the first item in the notification drawer; however, this is not done.

Expected behavior
A clear and concise description of the expected behavior.

In the demo, keyboard focus should be returned to the notification badge after the notification drawer is closed, and the keyboard focus should be trapped entirely within the notification drawer when it is open.

Screenshots
If applicable, add screenshots to help explain the issue.

Any other information?

See this blog post:

https://codepen.io/unleashalicia/pen/YzXrJBN
https://knowbility.org/blog/2020/accessible-slide-menus


Jira Issue: PF-1354

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the React notification-drawer basic demo at the linked PatternFly page and review the linked focus-management examples. Verify the drawer's current keyboard behavior, then ensure focus returns to the notification badge on close and cycles within the open drawer; validate both behaviors in the demo.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.