Font Library: Don't use header, main and footer elements within the Fonts modal dialog tab panels #58065
Labels
[Feature] Font Library
[Feature] Typography
Font and typography-related issues and PRs
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
The Fonts modal dialog should not contain
<header>
,<main>
, and<footer>
elements.These elements are supposed to be used either in the context of the body element or as descendants of sectioning content elements such as article, aside, nav, section.
Instead, here they are used within a
tabpanel
role which in turn is within adialog
role.Furthermore, when the modal dialog opens, all the rest of the content gets hidden from assistive technology. As such, these
<header>
,<main>
, and<footer>
become ARIA landmarks. We don't want to use ARIA landmarks within a role=dialog because it's semantically incorrect, it doesn't add value for users and it's even potenrially confusing.Screenshots:
Step-by-step reproduction instructions
Observe the code at
gutenberg/packages/edit-site/src/components/global-styles/font-library-modal/tab-panel-layout.js
Lines 25 to 50 in d7bba1b
Observe the code uses
<header>
,<main>
, and<footer>
elements.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: