Skip to content

fix(table): localize tree expander aria-label to unbreak lint on main#4149

Merged
josephfarina merged 1 commit into
mainfrom
nynexman4464/fix/tree-aria-i18n
Jul 22, 2026
Merged

fix(table): localize tree expander aria-label to unbreak lint on main#4149
josephfarina merged 1 commit into
mainfrom
nynexman4464/fix/tree-aria-i18n

Conversation

@nynexman4464

Copy link
Copy Markdown
Contributor

What

Unbreaks lint on main. The tree data plugin (#3789, merged today) shipped hardcoded "Expand row" / "Collapse row" aria-label strings on the expander button. The @astryx/no-hardcoded-i18n-string rule (added in #4010) flags these as errors, and the lint job runs pnpm lint repo-wide — so main is currently red and every open PR inherits the failure (that's how I found this, chasing a red check on the unrelated Crowdin PR #4148).

Fix

  • Route both aria-labels through useTranslator() with new catalog keys @astryx.tableTree.expandRow / @astryx.tableTree.collapseRow, mirroring the sibling selection and rowExpansion plugins.
  • Add matching entries to packages/core/locales/en.json.

Why it slipped through

#3789's branch predated the #4010 rule and wasn't rebased onto it, so its own CI was green; the violation only surfaced once merged into a main that has the rule.

Verification

  • eslint packages/core/src/Table/plugins/tree/useTableTreeData.tsx → clean (exit 0)
  • vitest run useTableTreeData useTableTreeState resolve.test → 75 passed
  • Pre-commit hooks (lint-staged + repo guardrails) passed

No changeset — internal lint fix, no runtime package API change.

Refs: #3789, #4010

The tree data plugin (#3789) shipped hardcoded "Expand row" / "Collapse
row" aria-labels on the expander button. The @astryx/no-hardcoded-i18n-string
rule (added in #4010) flags these as errors, so `pnpm lint` fails
repo-wide — main is red and every open PR inherits the failure.

Route both strings through useTranslator() with new catalog keys
@astryx.tableTree.expandRow / .collapseRow (mirroring the sibling
selection and rowExpansion plugins) and add matching entries to
packages/core/locales/en.json.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 21, 2026
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 21, 2026 11:22pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Table · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 1913 -
Complexity N/A Very High (101) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.7KB 0B

Accessibility Audit

Status: 1 accessibility violation(s) found — 1 serious.

Table - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 4/24 stories · Learn more
    • WCAG: 1.4.3 (Level AA)

Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@josephfarina

Copy link
Copy Markdown
Contributor

lg merging to unblock a pr i have!

@josephfarina
josephfarina merged commit 996fcf0 into main Jul 22, 2026
20 checks passed
josephfarina added a commit that referenced this pull request Jul 22, 2026
Pull in #4149 (localize tree expander aria-label) which fixes the
@astryx/no-hardcoded-i18n-string lint errors in useTableTreeData.tsx
that were failing CI on the stale merge ref. Branch does not touch
that file; merge is clean.
@github-actions
github-actions Bot deleted the nynexman4464/fix/tree-aria-i18n branch July 22, 2026 06:56
cixzhang added a commit that referenced this pull request Jul 22, 2026
Seven published-behavior PRs merged since v0.1.7 without a changeset, which
would leave their contributors uncredited in the CHANGELOG. Add changesets so
the v0.1.8 bump credits them:

- core docs.mjs redirect to the CLI (#4207)
- Table tree-data plugin: useTableTreeState / useTableTreeData (#3789)
- Table tree expander aria-label localization (#4149)
- foolproof init: postinstall nudges + non-interactive init (#4147, #4153, #4154, #4155)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants