docs(combobox): a11y migration analysis docs - #6618
Conversation
|
📚 Branch Preview Links🔍 Gen1 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Coverage Report for CI Build 31738073455Warning No base build found for commit Coverage: 96.241%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats💛 - Coveralls |
Description
Adds accessibility migration analyses for the 2nd-gen combobox family — a combobox plus the shared listbox and the two option-child components it composes. The combobox and picker share one
swc-listbox, and options/option-groups can be children of a listbox, combobox, or picker.combobox/accessibility-migration-analysis.mdswc-combobox— singlecomboboxrole on the inner<input>,aria-expanded/aria-controls/aria-activedescendant/aria-autocomplete, keepingaria-selected(chosen value) distinct from the active descendant (keyboard-active row)swc-listboxrendered in the combobox shadow DOM withswc-option/swc-option-groupchildren projected into it by slot;aria-controls(input→listbox) is same-root, onlyaria-activedescendant(input→light-DOM option) is cross-root viaariaActiveDescendantElementariaActiveDescendantElementresolves to a slotted option — directly and when nested inside answc-option-group— across NVDA/JAWS/VoiceOver and Chromium/WebKit/Firefox, with a documented fallback if any combo does not honor slot projectionvalueand distinct-sibling-label rule with a dev warning (value decoupled from label); folded in consumer-reported 1st-gen limitations (key/text separation, popup width/reflow, placeholder) as design motivationlistbox/accessibility-migration-analysis.md(new componentswc-listbox)role="listbox"owned on the host viaElementInternals, factored out so combobox and picker share one listbox and it can also be used standalone (APG listbox pattern)aria-multiselectable,LiveSelectionController); slotted option projection without re-renderingoption/accessibility-migration-analysis.md(new componentswc-option)role="option"owned on the host viaElementInternals— enabling the cross-root active-descendant reference and preserving per-optionlang(fixes SWC-2359)swc-menu-item(option vs. menuitem);valuedecoupled from label and unique per widget;aria-disabledover nativedisabled; distinct-sibling-label rule + dev warning; parent may be a listbox, combobox, or pickeroption-group/accessibility-migration-analysis.md(new componentswc-option-group)role="group"owned on the host, group naming, and the APG grouped-listbox pattern; sibling-label distinctness scoped within a group; never selectable/focusable/active; no nested groups; flagged as the extra-nesting case for the active-descendant verificationRegistered all four docs in
03_components/README.mdand regenerated navigation.Motivation and context
The 2nd-gen migration is an opportunity to address known accessibility gaps, align with the latest WAI-ARIA Authoring Practices, and ensure the components meet WCAG 2.2 AA compliance. Owning
role="option"/role="group"/role="listbox"on dedicated components (instead of borrowingsp-menu/sp-menu-item) is what lets the combobox and picker share one listbox and reference real author elements across shadow roots — removing 1st-gen's duplicate-render hack and its defects.Related issue(s)
Screenshots (if appropriate)
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
ariaActiveDescendantElementslotted-option verification itemvalue/ distinct-sibling-label rule and dev warning covered