diff --git a/BUG_FINDINGS.md b/BUG_FINDINGS.md new file mode 100644 index 0000000000..359d861ee3 --- /dev/null +++ b/BUG_FINDINGS.md @@ -0,0 +1,51 @@ +# Bug & Refactor Findings — `src/a11y` … `src/button` + +Findings from a review of `src/a11y`, `src/accordion`, `src/app-nav-bar`, +`src/aspect-ratio-box`, `src/avatar`, `src/badge`, `src/banner`, `src/block`, +`src/bottom-navigation`, `src/breadcrumbs`, `src/button` (2026-09-05). Each +entry was confirmed against the source before being listed here. + +Status legend: `Open` (not yet addressed). Entries that have been fixed and +merged to `main` are removed from this list. + +## Crashes / severe functional breaks + +| Status | File:Line | Summary | +|---|---|---| +| Open | `src/a11y/a11y.tsx:38` | `map[target] = map[target].push(violation)` assigns `push`'s return value (a number), not the array. A 3rd violation on the same DOM node throws `TypeError`. | +| Open | `src/app-nav-bar/app-nav-bar.tsx:173-175` | Evaluation-order bug: the mobile block reads `secondaryMenu`/`mobileSubNavPosition` before the desktop `mainItems.map()` (which assigns them) runs, so the mobile horizontal sub-nav can never render. Source has a `// @ts-expect-error always false` comment acknowledging this. | +| Open | `src/button-group/button-group.tsx:140-160` | `overrides: { BaseButton: {...}, ...child.props.overrides }` — if a child button also sets `overrides.BaseButton`, the shallow spread drops the injected `aria-checked`/`role`, breaking radio/checkbox semantics. | +| Open | `src/button/button.tsx:38-46` | `internalOnClick` only checks `isLoading`, never `disabled`. A `Button` rendered as `` with `disabled` stays keyboard-operable (Tab + Enter still fires `onClick`). | +| Open | `src/bottom-navigation/bottom-navigation.tsx:82` | `isActive={displayOverflow \|\| activeKey > 4}` is off-by-one; index `4` (the item reachable only via "More") never highlights the overflow selector even though its panel is shown. | +| Open | `src/bottom-navigation/bottom-navigation.tsx:101` | `aria-labelledby` on `Panel` references an id that `Selector` never renders — unconditionally broken tab/tabpanel association for screen readers. | +| Open | `src/button/styled-components.ts:803` | `getShapeStyles` handles `SHAPE.circle`/`SHAPE.square` but omits `SHAPE.round` (handled elsewhere in the file), so `shape="round"` buttons don't get fixed height/width and render as an oval/rectangle instead of a circle. | +| Open | `src/block/styled-components.ts:346-350` | The `flexWrap` style transform ignores its input and always returns `'wrap'`, so `flexWrap={false}` has no effect. | +| Open | `src/banner/styled-components.ts:123-149` | `StyledTrailingIconButton` (a raw `