Skip to content

docs(SelectorOption): a caller id lands on the content row, not on the option the listbox announces - #14060

Draft
cixzhang wants to merge 1 commit into
mainfrom
lane2/selectoroption-id-doc
Draft

cixzhang wants to merge 1 commit into
mainfrom
lane2/selectoroption-id-doc

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Summary

Docs only. When SelectorOption renders inside a Selector, it is the content row inside Selector's own role="option" element. A builder who gives SelectorOption an id (possible since #14051) could think that id names the option. They might then point aria-activedescendant or aria-controls at it, and a screen reader would announce the content row instead of the option. The ref entry in SelectorOption's docs now says where a caller id lands, and not to target it.

Change

  • SelectorOption.doc.mjs (en, zh, dense): one sentence in the ref entry. A caller id lands on the content row, not on the option the listbox announces, so do not point aria-activedescendant or aria-controls at it.
  • .changeset/selector-option-id-content-row.md: [docs], no behavior change.

No code, test or record change.

Testing

  • check:changesets passes.
  • Changeset coverage passes against v0.7.17 ("ships to @astryxdesign/core, each named").
  • Prettier is clean.

Writing rubric results

R1–R7: no knowledge record changes.

Overlap checked: #14052 (also SelectorOption, but it changes only the test file and the record; this PR changes only the docs and a changeset)

@vercel

vercel Bot commented Nov 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 30, 2026 6:59am UTC

Request Review

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

astracat-bot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 30, 2026, 7:10 AM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2fdfed3

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@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. This pull request is a draft, so CI has not run on this head; marking it ready for review starts its run.

The sentence added to the ref entry matches the code at this head: Selector renders the content a renderOption returns inside its own role="option" element, and that element keeps the id aria-activedescendant names, while a caller id reaches the Item row inside it. Selector.test.tsx already covers that exact case ("keeps the option id when a SelectorOption row takes a caller id"), and the English, Chinese and dense entries carry the same statement, with a [docs] changeset that describes it accurately.

No blocking findings.

Claims and files checked

Review mode: full; reason: no-earlier-review

Claims:

  • Docs only, with no code, test or record change — verified: the diff is two files, packages/core/src/Selector/SelectorOption.doc.mjs and the new changeset.
  • SelectorOption renders inside Selector's own option element — verified: Selector.tsx wraps the renderOption result in a role="option" element with its own id, on both the popover and the bottom-sheet paths.
  • A caller id has been possible since the previous pull request in this area — verified: that commit added id to the global attributes the row accepts.
  • A caller id does not name the option the listbox announces — verified: the Selector test asserts that the active-descendant reference is an option id and never the caller's, and that the option contains the caller's row.
  • aria-activedescendant and aria-controls must not point at the content row — verified by the same test and by the component record's accessibility clause, which gives role, name and state to the option row.
  • No behavior change — verified: no rendered or shipped source file is touched.
  • One sentence in the English, Chinese and dense docs — verified: all three ref descriptions carry it.
  • The changeset is a [docs] patch for the core package — verified in the changeset file.
  • check:changesets passes — verified: it reports 425 valid changesets at this head.
  • The overlap with the other open SelectorOption pull request is only the component, not the files — verified: that pull request changes the record and the test file only.
  • Changeset coverage against the last release — reported by the author; the changeset check at this head agrees with the patch plan.
  • Prettier is clean — reported by the author; the lint workflow is skipped on this draft head.
  • A screen reader would announce the content row if a builder targeted it — reported as the motivation; no assistive-technology run is needed for a docs edit.

Files:

  • packages/core/src/Selector/SelectorOption.doc.mjs — clear: the three ref entries agree with each other and with the changeset.
  • .changeset/selector-option-id-content-row.md — clear: valid frontmatter, [docs] category, patch bump of the core package.

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — 2fdfed39 Deployed Nov 30, 2026 by vercel[bot]
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.

1 participant