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

Font Library: Don't use header, main and footer elements within the Fonts modal dialog tab panels #58065

Closed
afercia opened this issue Jan 22, 2024 · 0 comments · Fixed by #58221
Assignees
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

Comments

@afercia
Copy link
Contributor

afercia commented Jan 22, 2024

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 a dialog 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:

Screenshot 2024-01-22 at 10 34 25

Screenshot 2024-01-22 at 10 37 34

Step-by-step reproduction instructions

  • Observe the code at

    <header>
    <VStack spacing={ 2 }>
    <HStack justify="flex-start">
    { !! handleBack && (
    <Button
    variant="tertiary"
    onClick={ handleBack }
    icon={ chevronLeft }
    size="small"
    />
    ) }
    { title && (
    <Heading
    level={ 2 }
    size={ 13 }
    className="edit-site-global-styles-header"
    >
    { title }
    </Heading>
    ) }
    </HStack>
    { description && <Text>{ description }</Text> }
    </VStack>
    </header>
    <main>{ children }</main>
    { footer && <footer>{ footer }</footer> }

  • 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

@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Typography Font and typography-related issues and PRs labels Jan 22, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants