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:Connectors:SyncRules page]Heading levels announced together with buttons elements #198001

Open
1 of 2 tasks
L1nBra opened this issue Oct 28, 2024 · 5 comments
Open
1 of 2 tasks
Labels
defect-level-3 Moderate UX disruption or potentially confusing impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Accessibility Team:Search WCAG A WCAG AA

Comments

@L1nBra
Copy link

L1nBra commented Oct 28, 2024

Description
Headings should be used correctly and for the text. There shouldn't be two heading level 1 elements. Buttons should be announced as button elements without headings.

Preconditions
Stateful Connectors -> Sync rules page is opened.
Connectors are added.

Steps to reproduce

1.Navigate to button for connector title while using only keyboard by pressing Tab key.
2.Observe screen reader.
3.Press Tab key.
4.Observe Screen reader.
5.Navigate to Edit button for connector title with the keyboard.
6.Press Enter.
7.Navigate to Save or Cancel button.
8.Observe screen reader.

NVDA speech viewer + UI elements
Image

Image

html snippet (component which has description element belongs to h1 element)
Image

Actual Result

  • Both for title and for description for connector screen reader announces heading level 1; heading level is also announced together with Save, Cancel buttons.

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.

Meta Issue

Kibana Version: 8.16.0-SNAPSHOT

OS: Windows 11 Pro

Browser: Chrome Version 130.0.6723.70 (Official Build) (64-bit)

Screen reader: NVDA

WCAG or Vendor Guidance (optional)

Related to: https://github.com/elastic/search-team/issues/8256

Tasks

Preview Give feedback
  1. Project:Accessibility Team:Search backport:prev-minor release_note:skip v8.18.0 v9.0.0
    JoseLuisGJ
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 28, 2024
@L1nBra L1nBra added WCAG A WCAG AA Team:Search defect-level-3 Moderate UX disruption or potentially confusing labels Oct 28, 2024
@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 28, 2024
@L1nBra L1nBra added the impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. label Oct 30, 2024
@L1nBra L1nBra changed the title [Stateful:Connectors:SyncRules page]Heading levels announced together with buttons elements [Search:Connectors:SyncRules page]Heading levels announced together with buttons elements Nov 7, 2024
@JoseLuisGJ JoseLuisGJ self-assigned this Nov 22, 2024
@JoseLuisGJ JoseLuisGJ pinned this issue Nov 22, 2024
@JoseLuisGJ
Copy link
Contributor

JoseLuisGJ commented Nov 22, 2024

This PR #201359 solves the issue regarding wrapping the Title and the Description within the same H1. Now both are siblings and only the Title is wrapped with the H1 tag.

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. @L1nBra

@JoseLuisGJ
Copy link
Contributor

This EUI doc regarding PageTitle confirms that just passing a regular text is the best option rather than an interactive edit inline component:

Image

@lukeelmers lukeelmers unpinned this issue Nov 25, 2024
@JoseLuisGJ
Copy link
Contributor

@L1nBra I added a task list in the ticket description due to there are things we can fix ini the short term but there are other than qill require more effort. This PR solve some parts of the issue described here and the second task item will be assess by the team to measure the feasibility and the approach.

JoseLuisGJ added a commit that referenced this issue Nov 26, 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](https://github.com/user-attachments/assets/e3b297a9-31e1-4471-a638-2166185551e6)

![image](https://github.com/user-attachments/assets/c9030e25-b067-40b5-b4f6-d07a52d16a30)

After:

![CleanShot 2024-11-22 at 12 56
25@2x](https://github.com/user-attachments/assets/41a8cbf9-e609-4fbb-b1cd-3f9256bcaa8e)

---------

Co-authored-by: Elastic Machine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 26, 2024
…c#201359)

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

Before:

![image](https://github.com/user-attachments/assets/e3b297a9-31e1-4471-a638-2166185551e6)

![image](https://github.com/user-attachments/assets/c9030e25-b067-40b5-b4f6-d07a52d16a30)

After:

![CleanShot 2024-11-22 at 12 56
25@2x](https://github.com/user-attachments/assets/41a8cbf9-e609-4fbb-b1cd-3f9256bcaa8e)

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 8487bc8)
kibanamachine added a commit that referenced this issue Nov 26, 2024
…201359) (#201806)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Search][a11y] Fixing connectors pageHeader hierarchy content
(#201359)](#201359)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"José Luis
González","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-26T14:48:15Z","message":"[Search][a11y]
Fixing connectors pageHeader hierarchy content (#201359)\n\nReplace the
existing `ConnectorNameAndDescription` component with\r\nseparate
`ConnectorName` and `ConnectorDescription` components for\r\nimproved
accessibility as pointed out in this
issue\r\nhttps://github.com//issues/198001 . Now only the
H1 wraps\r\nthe Title and the Descriptions is out of
it.\r\n\r\nBefore:\r\n\r\n![image](https://github.com/user-attachments/assets/e3b297a9-31e1-4471-a638-2166185551e6)\r\n\r\n![image](https://github.com/user-attachments/assets/c9030e25-b067-40b5-b4f6-d07a52d16a30)\r\n\r\nAfter:\r\n\r\n![CleanShot
2024-11-22 at 12
56\r\n25@2x](https://github.com/user-attachments/assets/41a8cbf9-e609-4fbb-b1cd-3f9256bcaa8e)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"8487bc83d9ebc20ec2e1a5a18286a2a522346e6c","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","v9.0.0","Team:Search","backport:prev-minor"],"title":"[Search][a11y]
Fixing connectors pageHeader hierarchy
content","number":201359,"url":"https://github.com/elastic/kibana/pull/201359","mergeCommit":{"message":"[Search][a11y]
Fixing connectors pageHeader hierarchy content (#201359)\n\nReplace the
existing `ConnectorNameAndDescription` component with\r\nseparate
`ConnectorName` and `ConnectorDescription` components for\r\nimproved
accessibility as pointed out in this
issue\r\nhttps://github.com//issues/198001 . Now only the
H1 wraps\r\nthe Title and the Descriptions is out of
it.\r\n\r\nBefore:\r\n\r\n![image](https://github.com/user-attachments/assets/e3b297a9-31e1-4471-a638-2166185551e6)\r\n\r\n![image](https://github.com/user-attachments/assets/c9030e25-b067-40b5-b4f6-d07a52d16a30)\r\n\r\nAfter:\r\n\r\n![CleanShot
2024-11-22 at 12
56\r\n25@2x](https://github.com/user-attachments/assets/41a8cbf9-e609-4fbb-b1cd-3f9256bcaa8e)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"8487bc83d9ebc20ec2e1a5a18286a2a522346e6c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201359","number":201359,"mergeCommit":{"message":"[Search][a11y]
Fixing connectors pageHeader hierarchy content (#201359)\n\nReplace the
existing `ConnectorNameAndDescription` component with\r\nseparate
`ConnectorName` and `ConnectorDescription` components for\r\nimproved
accessibility as pointed out in this
issue\r\nhttps://github.com//issues/198001 . Now only the
H1 wraps\r\nthe Title and the Descriptions is out of
it.\r\n\r\nBefore:\r\n\r\n![image](https://github.com/user-attachments/assets/e3b297a9-31e1-4471-a638-2166185551e6)\r\n\r\n![image](https://github.com/user-attachments/assets/c9030e25-b067-40b5-b4f6-d07a52d16a30)\r\n\r\nAfter:\r\n\r\n![CleanShot
2024-11-22 at 12
56\r\n25@2x](https://github.com/user-attachments/assets/41a8cbf9-e609-4fbb-b1cd-3f9256bcaa8e)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"8487bc83d9ebc20ec2e1a5a18286a2a522346e6c"}}]}]
BACKPORT-->

Co-authored-by: José Luis González <[email protected]>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this issue Nov 26, 2024
…c#201359)

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

Before:

![image](https://github.com/user-attachments/assets/e3b297a9-31e1-4471-a638-2166185551e6)

![image](https://github.com/user-attachments/assets/c9030e25-b067-40b5-b4f6-d07a52d16a30)

After:

![CleanShot 2024-11-22 at 12 56
25@2x](https://github.com/user-attachments/assets/41a8cbf9-e609-4fbb-b1cd-3f9256bcaa8e)

---------

Co-authored-by: Elastic Machine <[email protected]>
@erikcurrin-elastic
Copy link

Restructure the HTML to remove the h2 from the button

@JoseLuisGJ JoseLuisGJ removed their assignment Dec 9, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Dec 12, 2024
…c#201359)

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

Before:

![image](https://github.com/user-attachments/assets/e3b297a9-31e1-4471-a638-2166185551e6)

![image](https://github.com/user-attachments/assets/c9030e25-b067-40b5-b4f6-d07a52d16a30)

After:

![CleanShot 2024-11-22 at 12 56
25@2x](https://github.com/user-attachments/assets/41a8cbf9-e609-4fbb-b1cd-3f9256bcaa8e)

---------

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect-level-3 Moderate UX disruption or potentially confusing impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Accessibility Team:Search WCAG A WCAG AA
Projects
None yet
Development

No branches or pull requests

6 participants