Skip to content

Fix flaky tests and remove checkAccessibility overrides - #5873

Merged
Eugene (OEvgeny) merged 4 commits into
mainfrom
OEvgeny/fix-flaky-tests-and-axe-overrides
Oct 16, 2026
Merged

Eugene (OEvgeny) merged 4 commits into
mainfrom
OEvgeny/fix-flaky-tests-and-axe-overrides

Conversation

@OEvgeny

Copy link
Copy Markdown
Collaborator

Changelog Entry

Not required, development only.

Description

Fixes 2 flaky tests and removes window.checkAccessibility = async () => {} from tests, which disabled the accessibility check for the whole test. Remaining known violations are skipped explicitly with skipCheckAccessibility, scoped to the failing variants and snapshots, with a TODO.

Design

react-scroll-to-bottom may mistake the first scroll after its scroll animation as a resize while sticky, and scroll back to the bottom. pageObjects.scrollToTop() now scrolls again, like a user would.

Specific Changes

  • pageObjects.scrollToTop(): scroll again when the transcript snaps back to the bottom, fixes flaky scrollToEndButton.containerSize.html

  • activity/legacy/unknownAttachment.html: wait for the live region warning before asserting

  • Removed obsolete window.checkAccessibility overrides from 11 tests

  • Replaced the remaining overrides with skipCheckAccessibility and a TODO:

    • part-grouping/status.html, part-grouping/index.html: part grouping remounts when its first activity changes, aria-activedescendant points to the removed group
    • side-by-side/index.html: deprecated Copilot custom variant puts elements other than articles in role="feed"; color contrast in the "View code" dialog
    • markdown/vnext/markdownStreaming.html: markdown # renders a level-one heading
  • CHANGELOG.md: moved fix: prevent message actions from repeating bot responses #5865 and Show Copy confirmation for 5 seconds and keep focus indicator visible… #5872 entries from 4.19.2 to Unreleased, they were merged after the release

  • I have added tests and executed them locally

  • I have updated CHANGELOG.md

  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

Eugene Olonov added 3 commits October 16, 2026 11:05
#5865 and #5872 were merged after v4.19.2 was published (2026-10-09T05:20Z), but their entries were filed under 4.19.2.
- pageObjects.scrollToTop(): react-scroll-to-bottom ignores scroll events right after its animation ends without updating the sizes it remembers. The next scroll is mistaken as a resize while sticky and it scrolls back to the bottom. Scroll again (up to 3 attempts), like a user would. Fixes scrollToEndButton.containerSize.html failing ~15-25% under load (40/40 after).
- unknownAttachment.html: the live region renders the activity 5-15 ms after the transcript, wait for the console.warn before asserting.
Replacing window.checkAccessibility disabled accessibility checks for whole tests. With the checker running:

- 11 tests had obsolete overrides (no violations in any variant), removed. part-grouping/keyboard, navigation and position never ran with a variant, the overrides were dead code.
- Known violations are now skipped explicitly with skipCheckAccessibility, scoped to the failing variants and snapshots, with a TODO:
  - part-grouping/status and index (copilot): part grouping remounts when its first activity changes, aria-activedescendant points to the removed group.
  - side-by-side: the deprecated Copilot custom variant puts non-articles in role="feed"; contrast in the View code dialog.
  - markdown/vnext/markdownStreaming: bot markdown "# Heading" renders a level-one heading (#4721).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Timing-sensitive scrolling and restored accessibility checks need browser-suite confirmation beyond the available static review.

0 open findings

What changed in this PR

Improves Web Chat’s browser-test reliability and restores accessibility checks previously disabled by global overrides.

Changes:

  • Adds bounded scroll retries and waits for the live-region warning before asserting.
  • Replaces global accessibility overrides with explicit skips for known failures.
  • Moves two post-release fixes into the Unreleased changelog.
File Description
packages/​test/​page-object/​src/​globals/​pageObjects/​scrollToTop.js Retries scrolling when the transcript snaps back.
CHANGELOG.md Moves #5865 and #5872 fixes to Unreleased.
tests/​html2/​side-by-side/​index.html Scopes accessibility skips to affected variants and dialog snapshots.
tests/​html2/​part-grouping/​status.html Limits skips to affected Copilot snapshots.
tests/​html2/​part-grouping/​position.html Removes global accessibility override.
tests/​html2/​part-grouping/​navigation.html Removes global accessibility override.
tests/​html2/​part-grouping/​keyboard.html Removes global accessibility override.
tests/​html2/​part-grouping/​index.html Adds explicit Copilot accessibility skips.
tests/​html2/​part-grouping/​folded.skip.html Removes override from the skipped test.
tests/​html2/​markdown/​vnext/​markdownStreaming.html Explicitly skips checks for the known heading violation.
tests/​html2/​fluentTheme/​focusBack.multiple.html Removes override while retaining the existing skip.
tests/​html2/​copyButton/​layout.html Restores accessibility checks.
tests/​html2/​citation/​url.html Restores accessibility checks.
tests/​html2/​citation/​showModal.linkDefinitions.html Restores accessibility checks.
tests/​html2/​citation/​accordion.html Restores accessibility checks.
tests/​html2/​activity/​message-status.html Restores accessibility checks.
tests/​html2/​activity/​legacy/​unknownAttachment.html Waits for the warning before asserting.
tests/​html2/​activity/​collapsible.html Restores accessibility checks.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread __tests__/html2/activity/legacy/unknownAttachment.html Outdated
Comment thread __tests__/html2/markdown/vnext/markdownStreaming.html
Comment thread __tests__/html2/side-by-side/index.html

@compulim William Wong (compulim) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nitpicking.

Comment thread packages/test/page-object/src/globals/pageObjects/scrollToTop.js
- unknownAttachment.html: wait with @testduet/wait-for and expect.
- scrollToTop(): clarify why scrolling again is needed, add a TODO to remove the retry after compulim/react-scroll-to-bottom#145 is released.
@OEvgeny
Eugene (OEvgeny) enabled auto-merge (squash) October 16, 2026 21:10
@OEvgeny
Eugene (OEvgeny) merged commit faf8117 into main Oct 16, 2026
58 of 60 checks passed
@OEvgeny
Eugene (OEvgeny) deleted the OEvgeny/fix-flaky-tests-and-axe-overrides branch October 16, 2026 21:18
@OEvgeny Eugene (OEvgeny) mentioned this pull request Oct 16, 2026
1 of 11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants