Conversation
…entries Tracks the confirmed findings from the src/a11y..src/button review. The accordion itemRefs/ArrowUp and badge LEFT_PLACEMENTS fixes already merged to main, so their entries are removed here.
segmentViolationsByNode assigned Array.prototype.push's return value (the new length, a number) back into the map instead of just pushing onto the existing array. Once a DOM node had 2 violations, map[target] became a number; a 3rd violation on that same node then called .push on a number and threw a TypeError, crashing the dev-only A11y wrapper.
Owner
Author
|
Closing — opening the equivalent PR against uber/baseweb (upstream) instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
segmentViolationsByNodebuilds a map from DOM node target to its axeviolations. When a node already had an entry, it did:
Array.prototype.pushreturns the new length (a number), not the array,so this overwrote the array with a number. Once a node had 2 violations
recorded,
map[target]became a number instead of an array. On a 3rdviolation for that same node,
map[target].push(...)threw aTypeError, crashing the dev-onlyA11ywrapper.Also includes
BUG_FINDINGS.md, a tracker of the bug/refactor findingsfrom a broader review of
src/a11y..src/button(the accordion andbadge fixes already merged in uber#5406 / uber#5408 are removed from it).
Scope
Patch: Bug Fix