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

[Search][a11y] Fixing connectors pageHeader hirarchy content #201359

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JoseLuisGJ
Copy link
Contributor

@JoseLuisGJ JoseLuisGJ commented Nov 22, 2024

Replace the existing ConnectorNameAndDescription component with separate ConnectorName and ConnectorDescription components for improved accessibility as pointed out in this issue #198001 . Now only the H1 wraps the Title and the Descriptions is out of it.

Before:
image
image

After:

CleanShot 2024-11-22 at 12 56 25@2x

@JoseLuisGJ JoseLuisGJ requested a review from a team as a code owner November 22, 2024 11:47
@JoseLuisGJ JoseLuisGJ self-assigned this Nov 22, 2024
@JoseLuisGJ JoseLuisGJ added release_note:fix v9.0.0 Team:Search backport:prev-major Backport to (8.x, 8.16, 8.15) the previous major branch and all later branches still in development backport:version Backport to applied version labels v8.17.0 v8.16.1 Project:Accessibility labels Nov 22, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-accessibility (Project:Accessibility)

@JoseLuisGJ JoseLuisGJ added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes and removed v9.0.0 v8.17.0 v8.16.1 backport:version Backport to applied version labels backport:prev-major Backport to (8.x, 8.16, 8.15) the previous major branch and all later branches still in development release_note:fix labels Nov 22, 2024
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #102 / dashboard app - group 6 dashboard view edit mode shows lose changes warning and loses changes on confirmation when a new vis is added

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 2312 2313 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 2.6MB 2.6MB +417.0B

cc @JoseLuisGJ

Copy link
Contributor

@navarone-feekery navarone-feekery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small request; can you provide a gif of you interacting with the title/description just to confirm the functionality still works?

@JoseLuisGJ
Copy link
Contributor Author

Sure @navarone-feekery :

CleanShot.2024-11-22.at.15.13.48.mp4

@jedrazb
Copy link
Member

jedrazb commented Nov 22, 2024

Screenshot 2024-11-22 at 15 16 42

could you expand the h1 tag to make sure no buttons are wrapped within h1 tag?

@JoseLuisGJ
Copy link
Contributor Author

JoseLuisGJ commented Nov 22, 2024

Good point @jedrazb there are still buttons within the h1 tag reading the expected behaviour from the issue ticket #198001:

Expected Result

Heading level is only announced one time (for one element, in this case title of connector). Heading level is not announced for description, nor for Save, Cancel buttons.

As commented here in the original issue ticket: we, from Search POV, can solve the issue regarding H1 not wrapping the description.

But bearing in mind that:

<EnterpriseSearchContentPageTemplate
      pageChrome={[...connectorsBreadcrumbs, connector?.name ?? '...']}
      pageViewTelemetry={tabId}
      isLoading={isLoading}
      pageHeader={{
        description: connector ? <ConnectorDescription connector={connector} /> : '...',
        pageTitle: connector ? <ConnectorName connector={connector} /> : '...',
        rightSideGroupProps: {
          gutterSize: 's',
          responsive: false,
          wrap: false,
        },
        rightSideItems: getHeaderActions(index, connector),
        tabs: tabs as Array<EuiTabProps & { label: React.ReactNode }>,
      }}
    >
      {selectedTab?.content || null}
</EnterpriseSearchContentPageTemplate>
  1. PageHeader.PageTitle renders the content wrapped in a H1 by default
  2. Within the ConnectorName we provide. We use and consume this EUI component EuiInlineEditTitle which renders these two buttons. So this part would be so hard to fix due to is part of the global PageTemplate we use. So we should decide if that's OK leaving this buttons within H1 oterwise we should think about remove completely the edit inline feature for titles to get the accessibility compliance.

CleanShot 2024-11-22 at 15 39 46@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Project:Accessibility release_note:skip Skip the PR/issue when compiling release notes Team:Search
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Search:Connectors:SyncRules page]Heading levels announced together with buttons elements
4 participants