Skip to content

Improve and fix accessibility issues in modal and dropdown blocks.#1082

Merged
mauteri merged 2 commits intodevelopfrom
GP-1041
Apr 30, 2025
Merged

Improve and fix accessibility issues in modal and dropdown blocks.#1082
mauteri merged 2 commits intodevelopfrom
GP-1041

Conversation

@mauteri
Copy link
Copy Markdown
Contributor

@mauteri mauteri commented Apr 30, 2025

Description of the Change

Gen Herres was kind enough to review the accessibility with me in of our new blocks that were reworked in 0.32.0. While they were improved, some issues were still discovered.

  • After clicking escape, close, or clicking outside the modal which closes it, focus should return to the button that original opened the modal. Right now, focus is lost.
  • After clicking "Attending," the modal does not close (which is correct), however, focus should be on "Close" as that's the next logical step (if close button exists).
  • In addition, I fixed escape on dropdown to return to the triggering element.

Closes #1041

How to test the Change

Changelog Entry

Fixed - Bug fix

Credits

Props @mauteri

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#1082 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

@mauteri mauteri marked this pull request as ready for review April 30, 2025 01:13
@mauteri mauteri merged commit 6c7c6fb into develop Apr 30, 2025
15 checks passed
@mauteri mauteri deleted the GP-1041 branch April 30, 2025 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve and fix accessibility issues in Modal block

1 participant