Skip to content

fix(Banner): role="alert" covers the urgent message only; bind the urgent alert states - #6779

Merged
cixzhang merged 11 commits into
mainfrom
cindyxz/a11y-alert-20260930
Nov 6, 2026
Merged

cixzhang merged 11 commits into
mainfrom
cindyxz/a11y-alert-20260930

Conversation

@cixzhang

@cixzhang cixzhang commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

No visual change

This pull request changes alerting only. Nothing about how a Banner looks changes: no element, style or layout changes. role="alert" moves from the frame to the existing title-and-description element, and the space that separates the title and the description exists only in the alert's text (a flex column renders no whitespace-only text).

Checked in real Chromium at head 5d61b722 (main merged) against main 4ceed673, each from its own Storybook build: all 20 Banner stories, at 1280 px and 390 px, light and dark, left-to-right and right-to-left, each also re-rendered with role="alert" passed (80 of the runs). All 240 full-page screenshots are byte-identical between this head and main.

What changes is only what an urgent alert contains (accessible text of the role="alert" element, same stories, role="alert" passed):

Story main this head
Dismissable "Your session will expire soon.Please save your work to avoid losing changes.Dismiss" "Your session will expire soon. Please save your work to avoid losing changes."
With end button "New update availableVersion 2.0 is ready to install.Update now" "New update available Version 2.0 is ready to install."
Collapsible content, expanded "Emphasized TextDescription textButtonCollapseDismissFlex Slot" "Emphasized Text Description text"
With description "New update availableA new version of the application is available. Update now…" "New update available A new version of the application is available. Update now…"

A Banner without role renders no live role on either side (0 of 20 stories), so a non-urgent message is announced once, by the caller's useAnnounce. An urgent Banner carries one role="alert" and is not also announced through useAnnounce (Banner FR8), so no message is announced twice.

User impact

An urgent Banner (role="alert") put its whole frame in the alert region, so the region's text included control text: "Session expires soonDismiss", "Upload failedRetry", or the "Collapse" tooltip in the middle of the message. The title and the description were adjacent with no separator in the DOM text (the accessibility tree already exposes them as two text nodes). After this change, an urgent Banner's alert region holds the authored message only: the title and the description, with a space between them in the DOM text. The dismiss and expand controls, their tooltips, a caller's endContent action, and the supporting content area sit outside it. Every other Banner message is announced through the standard useAnnounce module, so one owner announces each message.

Problem and solution fit

  1. Why does it occur? Banner forwarded role to its outer frame, so the alert region held the whole banner, controls and closed tooltips included. The title and description are adjacent block elements with no separator in the region's text.
  2. Why does that harm the task? The alert region's content is what assistive technology receives when the message arrives. Control labels and tooltip text inside it are noise in an urgent interruption.
  3. Why does that matter? WCAG 2.2 4.1.3 Status Messages and the WAI-ARIA alert role: the region carries the complete authored message. The design owner's direction is to allow role="alert" for urgent messages and to use the standard announce modules for everything else, so a message is never announced twice.

Fix: when the caller passes role="alert", Banner places it on the message element (the title and the description) and not on the frame. ARIA attributes passed with it, such as aria-label, move with it, so the alert keeps its name. Inside an urgent alert only, a space separates the title and the description in the alert's text; a flex container renders no whitespace-only text, so nothing visual changes. Any other role and its attributes still land on the frame. No new prop, and no default changes: a Banner without role renders no live role, as before.

Expected behavior and authority

  • Owner decision for Banner FR8 and DEP-0007: cixzhang (design and engineering owner), 2026-11-05 15:10 UTC: "6779 I'd out of date a bit. We could allow a role alert for urgent ones but keep in mind we have standard announce modules to avoid issues". So role="alert" stays for urgent messages, and every other message uses the standard announce modules. This is why DEP-0007's replacement, migration, warning and downstream rows drop the persistent-mirror role="status" advice, leaving one announcement path: useAnnounce, or role="alert" for an urgent message.

  • component:Banner FR8, FR2, the Accessibility contract, DEC-2 and DEP-0007, updated in this PR: an urgent message MAY carry role="alert", which lands on the message element (title and description only). Other announcements go through useAnnounce at spec:AST-086 FR5's urgency, and a Banner with role="alert" is not also announced through useAnnounce.

  • spec:AST-086 FR2 and FR3 gain the urgent-Banner exception, and its Current-state line for Banner FR8 says so. Banner FR2, FR8 and the FR8 alert-state row name the aria-* attributes that travel with role="alert".

  • The Banner alert binding (STATUS_MESSAGE_PATTERN, AST-020/AST-021) over seven explicit urgent states. AST-009 is unchanged: no claim about spoken wording or timing.

Smallest restoration

  • Banner.tsx: role="alert" and its ARIA attributes move from the frame to the message element, and inside the alert a separator goes between the title and the description.
  • Banner.spec.md and AST-086 FR3: the record changes above.
  • Banner.doc.mjs: the guidance drops the persistent-mirror role="status" advice and says where role="alert" lands (English, Chinese, dense).
  • Tests:
    • the alert binding (jsdom + Chromium) with no known failures; the open and always-visible states expect the title only, because supporting content is outside the urgent message;
    • Banner.test.tsx cases for where the role and its ARIA attributes land, and the alert's exact text.
  • A patch changeset that names the accessibility target (component:Banner FR8; WCAG 2.2 4.1.3 Status Messages).
  • BannerStatusMap JSDoc: the same guidance as Banner.doc.mjs (announce with useAnnounce; role="alert" only for an urgent message).

Evidence

State Before (role on the frame) After
Dismissible warning region text "Session expires soonDismiss" "Session expires soon"
Collapsed supporting content "Session expires soonExpand" "Session expires soon"
Open supporting content "Session expires soonCollapseSave your work…" "Session expires soon"
Always-visible supporting content "Session expires soonSave your work…" "Session expires soon"
Caller action "Upload failedRetry" "Upload failed"
Description "Upload failedCheck your network and try again." "Upload failed Check your network and try again."

The before column is the six failures this binding recorded against the old placement. After: real Chromium, Alert.a11y.chromium.spec.ts, 8 of 8 pass with no known failures. Role, assertive channel and focus preservation hold across a message update.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Owner decisions

  • The urgent alert holds the title and the description only; supporting content, controls and their tooltips are outside it. cixzhang, 2026-11-06 10:55 UTC: "Also yeah just title and description".
  • This pull request changes alerting only, with no visual change. cixzhang, 2026-11-06 10:55 UTC: "6779 shouldn’t make any visual updates. Only alerting". See "No visual change" above.

Testing

  • Red first: Banner.test.tsx "puts an urgent role="alert" on the message" fails on the record-and-test commit (the role is on the frame) and passes with the fix.
  • vitest run packages/core/src/Banner: 74 pass. Alert.a11y.test.tsx: 8 pass.
  • Alert.a11y.chromium.spec.ts in real Chromium against this head's Storybook: 8 pass.
  • pnpm -F @astryxdesign/core typecheck, eslint, Prettier, pnpm check:knowledge, pnpm check:changesets.

Writing rubric results

R1 narration: none; the FR8, contract and DEC-2 text states the system in the present tense.
R2 research: none in the record.
R3 evidence: verification cells cite the binding and tests, not a pull request.
R4 rejected alternatives: DEC-2 has two, each one line ("a live role on the whole frame"; "deriving alert urgency from warning or error"). AST-086 (one FR3 sentence) has none added.
R5 change references: none.
R6 open questions: none in the record; the content-area question is in this description for the owner.

@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 6, 2026 5:18pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 30, 2026
@astracat-bot

astracat-bot Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 6, 2026, 5:30 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Sep 30, 2026
github-actions Bot added a commit that referenced this pull request Sep 30, 2026
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 7a157c5

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
lab/CommentComposer 120.1 kB (+83 B) · 1.9 kB CSS (0) — — · — · —
Banner · Storybook 53.8 kB (+75 B) · 9.8 kB CSS (0) 513 (+18) ✓ · ✓ · —
lab/CommentThread 296.2 kB (+73 B) · 2.4 kB CSS (0) — — · — · —
1 more component
Component Size LoC Visual · A11y · RTL
lab/Comments 301.8 kB (+68 B) · 2.5 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 6.75 MB packed (+742 B); no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 19 rows, core 24 rows; run pnpm api:report.

Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 13, 2026
@cixzhang cixzhang closed this Oct 21, 2026
@github-actions
github-actions Bot deleted the cindyxz/a11y-alert-20260930 branch October 22, 2026 06:22
@cixzhang
cixzhang restored the cindyxz/a11y-alert-20260930 branch October 26, 2026 14:04
@cixzhang cixzhang reopened this Oct 26, 2026
@github-actions github-actions Bot removed the needs:design-review Affects visuals — Design should review label Oct 26, 2026
@cixzhang
cixzhang marked this pull request as ready for review October 26, 2026 14:09
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 5, 2026
@cixzhang cixzhang changed the title test(a11y): bind Banner urgent alert states fix(Banner): role="alert" covers the urgent message only; bind the urgent alert states Nov 5, 2026

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's spec decision, and five fixes are needed either way.

This head no longer only adds tests: it moves a caller's role="alert" from Banner's frame onto its message element, and it rewrites Banner FR2, FR8, DEC-2 and DEP-0007 and spec:AST-086 FR3 to match. Those record changes alter current requirements, so an engineering owner needs to approve or reject them, including the space every Banner with a description now renders between title and description. An engineering owner records approval by commenting /approve-spec 37ab0b0d3d4d2855a0df2d400ca36e04b8df8078, and the author can do this as an engineering owner.

Blocking:

  • Callers moving off DEP-0007's status-derived roles are no longer told that role="status" keeps a persistent mirror, and its replacement now says role="alert" lands on the message element (Banner.spec.md:60, :63); that needs an explicit owner decision for DEP-0007, cited in the description. Found by: deprecation rule
  • The title and description still describe a test-only change ("does not … change runtime behavior", six recorded failures, one record touched), while this head changes Banner.tsx, ships a [fix] changeset, edits two records and records no failures, so please retitle, rewrite the body for this head and rerun the writing rubric over both records.
  • The changeset says what "a screen reader" reads and that title and description now "read as two parts", but the evidence is DOM and accessibility tree only and Chromium's tree already exposed them as two text nodes, so please describe the role placement instead.
  • The proposed Banner record contradicts itself on role="status": DEP-0007's downstream and warning rows and the code still offer it, while the docs, FR8 and the replacement row drop it, so keep it everywhere or remove it everywhere.
  • A caller's aria-label, and any other aria-* passed with role="alert", stays on the frame, so the alert loses its name (Banner.tsx:665); please move those attributes with the role and add a test.

[Automated review]

className,
style,
)}
role={isUrgentAlert ? undefined : role}

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.

Only role moves to the message element. aria-label, aria-labelledby, aria-atomic and other attributes passed with role="alert" stay here in rest, on a div that now has no role. In Chromium, <Banner role="alert" aria-label="Upload error" …> exposes an alert named "Upload error" before this change and an unnamed alert after it. Please route the alert's naming and live-region attributes to the message element too, and add a test.

Comment thread packages/core/src/Banner/Banner.tsx Outdated
Comment on lines +722 to +724
{/* A flex container renders no whitespace-only text, so this space
only separates the title and the description in the text that
assistive technology reads. */}

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.

Non-blocking: Chromium's accessibility tree has no node for this space and already exposes the title and description as two text nodes without it, so the space changes DOM text only. Suggested:

{/* A flex container does not render whitespace-only text. This space
    separates the title and the description in the DOM text only. */}

| package | `@astryxdesign/core` |
| surface | Default ARIA role of `Banner`: `role="alert"` for `warning` and `error`, `role="status"` for `info` and `success`, derived from `status` when the caller passes no `role` |
| old contract | Visual `status` selects the live-region role of the Banner root |
| replacement | A caller that announces an async outcome calls `useAnnounce` from the transition that produced it. An urgent message passes `role="alert"`, which Banner places on its message element (FR8). Inside a mounted live container, `spec:AST-086` FR4 applies instead. |

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.

This changes DEP-0007's replacement (and its migration row on line 63). Callers moving off the status-derived roles are no longer told that role="status" keeps a persistent mirror. That needs an explicit owner decision for DEP-0007, cited in the pull request description (a decision card, or the owner's quoted words with a time), or these rows restored. Found by: deprecation rule

| warning | Consumer docs and the release notes name `DEP-0007` and the explicit `role` that keeps the released semantics. No runtime warning (`spec:AST-017` FR29) |
| migration | Non-mechanical: a caller that announces an async outcome calls `useAnnounce` from the transition that produced it; a caller with an urgent message passes `role="alert"`. Inside a mounted live container, `spec:AST-086` FR4 applies instead. |
| codemod | None: whether a Banner needs an announcement, and when, depends on the transition that renders it, which only the caller knows; adding the released role everywhere would restore the coupling this cleanup removes |
| downstream | Maintained docs teach `useAnnounce` for async outcomes and explicit `role` for persistent mirrors. Inside a mounted live container, `spec:AST-086` FR4 applies instead. |

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.

This row still says maintained docs teach an explicit role for persistent mirrors, and warning (line 62) still promises the explicit role that keeps the released semantics. But this pull request removes the role="status" advice from Banner.doc.mjs in all three locales, and the replacement row no longer offers it. Please keep role="status" in the docs and the replacement, or update these rows to say what replaces it.

Comment thread .changeset/banner-alert-message-only.md Outdated
'@astryxdesign/core': patch
---

[fix] Banner: `role="alert"` now covers the urgent message only. Banner places the role on the title and description instead of the whole banner, so a screen reader no longer reads the dismiss or expand control, its tooltip, a caller's action, or the supporting content as part of the alert, and the title and description read as two parts. Other roles still land on the banner frame. Use `role="alert"` only for an urgent message, and announce every other message with `useAnnounce`.

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.

The evidence for this change is DOM and accessibility tree, which cannot show what a screen reader reads. Chromium's tree also exposed the title and description as two separate text nodes before this change; the new space changes DOM text only. Suggested: "Banner: role=\"alert\" now sits on the title and description only, so the dismiss and expand controls, their tooltips, a caller's action and the supporting content are outside the alert region."

…e separator renders only in the alert; DEP-0007 rows drop the persistent-mirror role

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's spec decision, and three fixes are needed either way.

This head moves a caller's role="alert", and the aria-* passed with it, from Banner's frame onto its message element, and rewrites Banner FR2, FR8, DEC-2, the DEP-0007 rows and spec:AST-086 FR3 to match. Those record changes alter current requirements, so an engineering owner needs to approve or reject them by commenting /approve-spec 9c58b0b838816feb6c94d906c12cadbf1c81f8df; the author can do this as an engineering owner. The earlier DEP-0007, description, changeset and aria-label findings are resolved.

Blocking:

  • Miss: spec:AST-086 FR2 still says an element that mounts together with its text "MUST NOT carry a live role", which contradicts the new FR3 exception for the urgent Banner alert, so please give FR2 the same exception, update its Current-state impact line, and limit Banner's "A Banner mounted together with its message is not a reliable announcement" to other messages.
  • Proposed Banner FR2 keeps "supported DOM props" on the frame with role="alert" as the only exception, while Banner.tsx now moves every aria-* prop to the message element, so please name the aria-* attributes in FR2, FR8 and the FR8 alert-state verification row.
  • The description's User impact says a screen-reader user "hears" a run-on string and that the title and description "run together with no break", but Chromium's accessibility tree already exposes them as two text nodes on the base and the new space changes DOM text only, so please describe the DOM and accessibility-tree difference instead of speech (Miss: the record's "read as two parts" makes the same claim).

[Automated review]

- **FR3 — Live roles only on persistent containers.** A component MAY own a
live role only on an element that stays mounted while its content changes.
It MUST NOT mount that element already holding the text to announce.
It MUST NOT mount that element already holding the text to announce, except

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.

Miss: FR2 just above still says an element that mounts together with its text "MUST NOT carry a live role or aria-live", and the Current-state impact says Banner FR8 already matches FR2. Please give FR2 the same urgent-Banner exception and update that line, so the two rules agree.

| ID | Invariant | Basis | Contract state |
| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------ |
| FR1 | The current render places `banner` on the colored status surface, which is Banner's primary painted surface and reflects `container` and `status`. | Current source, public docs, and tests | Current behavior |
| FR2 | The Banner frame receives the public ref, role, supported DOM props, `xstyle`, `className`, and `style`; it also paints the selected `boxShadow`. The exception is `role="alert"`, which lands on the message element (FR8). | Current source and tests | Current behavior |

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.

Banner.tsx now moves every aria-* prop passed with role="alert" to the message element, but this row keeps supported DOM props on the frame with only role="alert" excepted. Suggested: The exception is role="alert" and the aria-* attributes passed with it, which land on the message element (FR8). FR8 and the FR8 alert-state row need the same words.

genuinely urgent content that should interrupt current speech; it is not used on
a Banner added inside a mounted live container.
announcement urgency. An urgent Banner's message element carries `role="alert"`;
its exposed text is the title and the description, read as two parts. Controls,

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.

Miss: "read as two parts" claims speech. Chromium's accessibility tree already exposes the title and description as two text nodes without the space, and DOM and accessibility-tree evidence cannot show what is spoken. Suggested: "its exposed text is the title and the description."

…a-* attributes travel with role=alert; DOM wording

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's spec decision, and two fixes are needed either way.

This head moves a caller's role="alert", and the aria-* passed with it, from Banner's frame onto its message element, and rewrites Banner FR2, FR8, DEC-2, the DEP-0007 rows and spec:AST-086 FR2 and FR3 to match. Those record changes alter current requirements, so an engineering owner needs to approve or reject them by commenting /approve-spec followed by this pull request's full head SHA; the author can do this as an engineering owner. The three findings from the last review (AST-086 FR2, the aria-* wording in FR2, and the speech claim) are resolved.

Blocking:

  • Miss: Callers moving off Banner's status-derived roles are no longer told that role="status" keeps a persistent status mirror (DEP-0007 replacement, warning, migration and downstream rows), and that change needs an explicit owner decision for DEP-0007, so please name the owner and quote their words with the time in the description, since "Owner direction (Banner FR8 and DEP-0007, Nov 5)" gives neither. Found by: deprecation rule.
  • Miss: The [fix] changeset names the old and new placement but not the accessibility target it serves, which AST-017 FR53 requires, so please add it, for example "so an urgent alert holds only its message (component:Banner FR8; WCAG 2.2 4.1.3 Status Messages)".

Non-blocking: 466 of the 469 changed lines in Banner.doc.mjs are a Prettier reflow around three guidance edits; splitting the reflow out would make the guidance change reviewable.

[Automated review]

| package | `@astryxdesign/core` |
| surface | Default ARIA role of `Banner`: `role="alert"` for `warning` and `error`, `role="status"` for `info` and `success`, derived from `status` when the caller passes no `role` |
| old contract | Visual `status` selects the live-region role of the Banner root |
| replacement | A caller that announces an async outcome calls `useAnnounce` from the transition that produced it. An urgent message passes `role="alert"`, which Banner places on its message element (FR8). Inside a mounted live container, `spec:AST-086` FR4 applies instead. |

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.

Miss: this row, with warning, migration and downstream (lines 62, 63 and 65), stops offering role="status" as the persistent-mirror replacement for callers moving off the status-derived roles. A change to a DEP entry needs an explicit owner decision that names it: who decided, their quoted words and when. The description's "Owner direction (Banner FR8 and DEP-0007, Nov 5)" names no owner, quotes no words and gives a date only, and /approve-spec does not stand in for it. Found by: deprecation rule.

Comment thread .changeset/banner-alert-message-only.md Outdated
'@astryxdesign/core': patch
---

[fix] Banner: `role="alert"` now sits on the title and description only, not on the whole banner, so the dismiss and expand controls, their tooltips, a caller's action, and the supporting content are outside the alert. ARIA attributes passed with `role="alert"`, such as `aria-label`, move with it. Other roles still land on the banner frame. Use `role="alert"` only for an urgent message, and announce every other message with `useAnnounce`.

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.

Miss: AST-017 FR53, which makes this accessibility change a patch [fix], says the Changeset names the old and new behavior and the accessibility target it serves. This line names the placement change but no target. Suggest ending the first sentence with "so an urgent alert holds only its message (component:Banner FR8; WCAG 2.2 4.1.3 Status Messages)".

@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 5d61b72

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 6, 2026

@astracat-bot astracat-bot Bot 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.

Changes requested: the spec changes are approved for this head, and three fixes remain.

This head moves a caller's role="alert", and the aria-* passed with it, from Banner's frame onto its title-and-description element. The alert states render the same pixels as before, and the new tests and the Chromium alert binding pass.

Blocking:

  • Miss: Callers moving off Banner's status-derived roles are no longer told that role="status" keeps a persistent status mirror (DEP-0007 replacement, warning, migration and downstream rows), and that change needs an explicit owner decision for DEP-0007 beyond the spec approval, so please name the owner and quote their words with the time in the description, since "Owner direction (Banner FR8 and DEP-0007, Nov 5)" gives neither. Found by: deprecation rule.
  • The [fix] changeset names the old and new placement but not the accessibility target it serves, which AST-017 FR53 requires, so please add it, for example "so an urgent alert holds only its message (component:Banner FR8; WCAG 2.2 4.1.3 Status Messages)".
  • Miss: The BannerStatusMap JSDoc in packages/core/src/Banner/index.ts still tells builders to opt into role="status", which the updated FR8 and DEP-0007 downstream row no longer teach, so please align it with the new Banner.doc.mjs guidance.

One non-blocking wording suggestion is inline.

[Automated review]

Comment thread .changeset/banner-alert-message-only.md Outdated
'@astryxdesign/core': patch
---

[fix] Banner: `role="alert"` now sits on the title and description only, not on the whole banner, so the dismiss and expand controls, their tooltips, a caller's action, and the supporting content are outside the alert. ARIA attributes passed with `role="alert"`, such as `aria-label`, move with it. Other roles still land on the banner frame. Use `role="alert"` only for an urgent message, and announce every other message with `useAnnounce`. No visual change: the banner renders the same pixels as before.

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.

AST-017 FR53, which makes this accessibility change a patch [fix], says the Changeset names the old and new behavior and the accessibility target it serves. This line names the placement change and "No visual change", but still no target. Suggest ending the first sentence with "so an urgent alert holds only its message (component:Banner FR8; WCAG 2.2 4.1.3 Status Messages)".

…tusMap JSDoc matches the alert guidance

The changeset says the move serves component:Banner FR8 and WCAG 2.2 4.1.3 Status Messages.
BannerStatusMap no longer tells builders to opt into role="status"; it points to useAnnounce and keeps role="alert" for urgent messages.
@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 6, 2026

@astracat-bot astracat-bot Bot 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.

Changes requested: one record fix remains. The spec changes are approved for this head, and the three earlier fixes are in.

role="alert", and the aria-* passed with it, now land on Banner's title-and-description element, so an urgent alert holds only its message. The new unit tests fail on main and pass here, the Chromium alert binding passes all seven states, and the alert renders the same pixels as before.

Blocking:

  • Miss: AST-086 FR2's first sentence still says the owner announces through the shared channel whenever a message element mounts with its text, excepting only FR4, FR10, FR11 and FR14, which contradicts Banner FR8 ("A Banner with role="alert" is not also announced through useAnnounce"), so please add the urgent Banner's role="alert" message (FR3) to that exception list (docs/specs/AST-086-status-announcements/spec.md:80-83).

One non-blocking wording suggestion is inline.

[Automated review]

Comment on lines 81 to 83
shows a message mounts, unmounts, or is replaced together with its text, the
owner announces through the shared announcement channel, except as FR4, FR10,
FR11, and FR14 provide. The new element

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.

Miss: this sentence still requires the owner to announce through the shared channel when the element mounts together with its text, and its exceptions (FR4, FR10, FR11, FR14) do not cover the urgent Banner that the next sentence and FR3 now allow. Banner FR8 says a Banner with role="alert" is not also announced through useAnnounce, and FR1 forbids doing both, so for an urgent Banner that appears with its text the two records disagree. Suggested:

  owner announces through the shared announcement channel, except as FR3 (an
  urgent Banner's `role="alert"` message), FR4, FR10, FR11, and FR14 provide.

Comment thread packages/core/src/Banner/Banner.tsx Outdated
* pass an explicit role when a persistent semantic mirror is appropriate.
* announce async outcomes from their transition handler with `useAnnounce`.
* Pass `role="alert"` only for an urgent message: Banner places it on the
* title and description, so controls and supporting content are not read.

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.

Non-blocking: the controls and supporting content are still read when the person browses; only the alert leaves them out. Banner.doc.mjs already says "not read as part of the alert". Suggested:

 * title and description, so controls and supporting content are not read as
 * part of the alert.

…gent Banner alert

FR2 named FR4, FR10, FR11 and FR14 as the only exceptions to announcing through the shared channel, which contradicted FR3 and Banner FR8 for an urgent Banner. The Banner JSDoc now says controls are not read as part of the alert.
@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 7a157c5

@github-actions github-actions Bot added needs:spec-owner-review Current knowledge records await owner approval and removed needs:spec-owner-review Current knowledge records await owner approval labels Nov 6, 2026

@astracat-bot astracat-bot Bot 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.

Approved pending CI: the required checks are still running on this head.

role="alert" and the aria-* passed with it now sit on Banner's title and description, so an urgent alert leaves out the controls, their tooltips and the supporting content, with no visual change. The component:Banner and spec:AST-086 record changes are approved for this head, and AST-086 FR2 now agrees with Banner FR8. The new placement tests fail before the fix and pass with it, the seven urgent alert states pass in Chromium, and the alert renders are pixel-identical to the base.

[Automated review]

@cixzhang
cixzhang merged commit f8640a4 into main Nov 6, 2026
104 of 109 checks passed
@github-actions
github-actions Bot deleted the cindyxz/a11y-alert-20260930 branch November 7, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 7a157c56 Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) 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.

1 participant