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

[React@18 failing test] fix discover/group3 discover doc viewer flyout accessibility should use expected a11y attributes #196844

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Oct 18, 2024

Summary

We're working on upgrading Kibana to React@18 (in Legacy Mode). There are a couple failing tests when running React@18 in Legacy mode and this is one of them

[job] [logs] FTR Configs #58 / discover/group3 discover doc viewer flyout accessibility should use expected a11y attributes

This one is simple. Native to react useId implementation produces ids like this: :r3: and when you attempt to use such ids with id selector they're invalid . e.g. document.querySelector('#:r3:') throws an error. A workaround is to use attribute selector document.querySelector('[id=":r3:"]'). This is the same problem as we've seen before #191632

@Dosant Dosant added release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 18, 2024
@Dosant Dosant requested a review from a team as a code owner October 18, 2024 10:35
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

Thanks!

@Dosant Dosant enabled auto-merge (squash) October 18, 2024 11:24
@Dosant Dosant merged commit cf5d2e7 into elastic:main Oct 18, 2024
32 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11404183670

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 18, 2024
…t accessibility should use expected a11y attributes (elastic#196844)

## Summary

We're working on upgrading Kibana to React@18 (in Legacy Mode). There
are a couple failing tests when running React@18 in Legacy mode and this
is one of them

[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/243743#01929ee7-11b8-41c3-af79-1437561a6ef0)
[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/243743/jobs/01929ee7-11b8-41c3-af79-1437561a6ef0/artifacts/01929f0a-dc7a-42ff-9a01-809c31e1dc71)
FTR Configs elastic#58 / discover/group3 discover doc viewer flyout
accessibility should use expected a11y attributes

This one is simple. Native to react `useId` implementation produces ids
like this: `:r3:` and when you attempt to use such ids with id selector
they're invalid . e.g. `document.querySelector('#:r3:')` throws an
error. A workaround is to use attribute selector
`document.querySelector('[id=":r3:"]')`. This is the same problem as
we've seen before elastic#191632

(cherry picked from commit cf5d2e7)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 18, 2024
… flyout accessibility should use expected a11y attributes (#196844) (#196872)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[React@18 failing test] fix discover/group3 discover doc viewer
flyout accessibility should use expected a11y attributes
(#196844)](#196844)

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

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

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-18T12:59:44Z","message":"[React@18
failing test] fix discover/group3 discover doc viewer flyout
accessibility should use expected a11y attributes (#196844)\n\n##
Summary\r\n\r\nWe're working on upgrading Kibana to React@18 (in Legacy
Mode). There\r\nare a couple failing tests when running React@18 in
Legacy mode and this\r\nis one of
them\r\n\r\n\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/243743#01929ee7-11b8-41c3-af79-1437561a6ef0)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/243743/jobs/01929ee7-11b8-41c3-af79-1437561a6ef0/artifacts/01929f0a-dc7a-42ff-9a01-809c31e1dc71)\r\nFTR
Configs #58 / discover/group3 discover doc viewer
flyout\r\naccessibility should use expected a11y attributes\r\n\r\nThis
one is simple. Native to react `useId` implementation produces
ids\r\nlike this: `:r3:` and when you attempt to use such ids with id
selector\r\nthey're invalid . e.g. `document.querySelector('#:r3:')`
throws an\r\nerror. A workaround is to use attribute
selector\r\n`document.querySelector('[id=\":r3:\"]')`. This is the same
problem as\r\nwe've seen before
https://github.com/elastic/kibana/pull/191632","sha":"cf5d2e70da3af649bd97931c4e95eee954aa0bb3","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor"],"title":"[React@18
failing test] fix discover/group3 discover doc viewer flyout
accessibility should use expected a11y
attributes","number":196844,"url":"https://github.com/elastic/kibana/pull/196844","mergeCommit":{"message":"[React@18
failing test] fix discover/group3 discover doc viewer flyout
accessibility should use expected a11y attributes (#196844)\n\n##
Summary\r\n\r\nWe're working on upgrading Kibana to React@18 (in Legacy
Mode). There\r\nare a couple failing tests when running React@18 in
Legacy mode and this\r\nis one of
them\r\n\r\n\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/243743#01929ee7-11b8-41c3-af79-1437561a6ef0)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/243743/jobs/01929ee7-11b8-41c3-af79-1437561a6ef0/artifacts/01929f0a-dc7a-42ff-9a01-809c31e1dc71)\r\nFTR
Configs #58 / discover/group3 discover doc viewer
flyout\r\naccessibility should use expected a11y attributes\r\n\r\nThis
one is simple. Native to react `useId` implementation produces
ids\r\nlike this: `:r3:` and when you attempt to use such ids with id
selector\r\nthey're invalid . e.g. `document.querySelector('#:r3:')`
throws an\r\nerror. A workaround is to use attribute
selector\r\n`document.querySelector('[id=\":r3:\"]')`. This is the same
problem as\r\nwe've seen before
https://github.com/elastic/kibana/pull/191632","sha":"cf5d2e70da3af649bd97931c4e95eee954aa0bb3"}},"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/196844","number":196844,"mergeCommit":{"message":"[React@18
failing test] fix discover/group3 discover doc viewer flyout
accessibility should use expected a11y attributes (#196844)\n\n##
Summary\r\n\r\nWe're working on upgrading Kibana to React@18 (in Legacy
Mode). There\r\nare a couple failing tests when running React@18 in
Legacy mode and this\r\nis one of
them\r\n\r\n\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/243743#01929ee7-11b8-41c3-af79-1437561a6ef0)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/243743/jobs/01929ee7-11b8-41c3-af79-1437561a6ef0/artifacts/01929f0a-dc7a-42ff-9a01-809c31e1dc71)\r\nFTR
Configs #58 / discover/group3 discover doc viewer
flyout\r\naccessibility should use expected a11y attributes\r\n\r\nThis
one is simple. Native to react `useId` implementation produces
ids\r\nlike this: `:r3:` and when you attempt to use such ids with id
selector\r\nthey're invalid . e.g. `document.querySelector('#:r3:')`
throws an\r\nerror. A workaround is to use attribute
selector\r\n`document.querySelector('[id=\":r3:\"]')`. This is the same
problem as\r\nwe've seen before
https://github.com/elastic/kibana/pull/191632","sha":"cf5d2e70da3af649bd97931c4e95eee954aa0bb3"}}]}]
BACKPORT-->

Co-authored-by: Anton Dosov <[email protected]>
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) release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants