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

Toast Notification focuses original element after disappearing #7115

Open
lukaw3d opened this issue Feb 1, 2024 · 3 comments
Open

Toast Notification focuses original element after disappearing #7115

lukaw3d opened this issue Feb 1, 2024 · 3 comments
Labels
accessibility WCAG support bug issue that does not match design or documentation and requires code changes to address

Comments

@lukaw3d
Copy link
Contributor

lukaw3d commented Feb 1, 2024

Changing focus after toast notification disappears is disruptive.

Expected Behavior

Don't change focus when toast notification disappears, or make it configurable

Actual Behavior

See steps to reproduce

URL, screen shot, or Codepen exhibiting the issue

See steps to reproduce

Steps to Reproduce

Your Environment

  • Grommet version: 2.34.2
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
@taysea
Copy link
Collaborator

taysea commented Feb 2, 2024

Hi @lukaw3d -- can you elaborate what you mean by "changing focus"? I believe the intended behavior is to restore focus onto the element that was last in focus before the toast notification opened. This is in alignment with WCAG accessibility best practices.

@lukaw3d
Copy link
Contributor Author

lukaw3d commented Feb 2, 2024

Yes, in "Steps to reproduce" it restores focus to "Open Toast Notification".

Which accessibility guidelines are you referring to?

Modal Dialog? https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/#:~:text=When%20a%20dialog%20closes
Alert? https://www.w3.org/WAI/ARIA/apg/patterns/alert/#:~:text=they%20do%20not%20affect%20keyboard%20focus

@taysea
Copy link
Collaborator

taysea commented Feb 15, 2024

Thank you for clarifying. I would agree that "Toast" which functions like an alert should not change the focused element based on the linked guidance. Adding accessibility and bug labels to this.

@taysea taysea added accessibility WCAG support bug issue that does not match design or documentation and requires code changes to address labels Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility WCAG support bug issue that does not match design or documentation and requires code changes to address
Projects
None yet
Development

No branches or pull requests

2 participants