Skip to content

fix(empty-state): place rest spread before contract role so consumers cannot clobber it - #4826

Open
cixzhang wants to merge 1 commit into
mainfrom
fix/component-audit-2026-08-08
Open

fix(empty-state): place rest spread before contract role so consumers cannot clobber it#4826
cixzhang wants to merge 1 commit into
mainfrom
fix/component-audit-2026-08-08

Conversation

@cixzhang

@cixzhang cixzhang commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

EmptyState sets role="status" for live-region semantics (content
announced to screen readers). The rest spread ({...props}) was placed
after it, which means a consumer passing role via BaseProps would
silently override the component's contract prop.

Moves {...props} before role="status" so the component always wins,
per the established rest-spread precedence pattern used by other Astryx
components (rest first, then contract props, then merged styles).

No behavior change for consumers who don't pass role (the common case).

Night Watch -- Component Auditor

… cannot clobber it

EmptyState sets role="status" for live-region semantics. The rest spread
was placed after it, which means a consumer passing role via BaseProps
would silently override the component's contract.

Move {...props} before role="status" so the component always wins on its
contract prop, per the established precedence pattern (rest -> contract ->
merged styles).
@cixzhang cixzhang added the hardening Component hardening and quality sweep label Aug 8, 2026
@cixzhang
cixzhang requested a review from imdreamrunner as a code owner August 8, 2026 10:13
@cixzhang cixzhang added the hardening Component hardening and quality sweep label Aug 8, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 8, 2026
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
astryx Ignored Ignored Aug 8, 2026 10:13am

Request Review

@github-actions

github-actions Bot commented Aug 8, 2026

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

EmptyState (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 133 -
Complexity N/A Medium (9) -

Bundle Size Summary

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

Accessibility Audit

Status: No accessibility violations detected.


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

github-actions Bot added a commit that referenced this pull request Aug 8, 2026
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. hardening Component hardening and quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant