You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] ComplexSelector: the default trigger is named by its label while it shows the value (Label in Name, WCAG 2.5.3) #7965
The default trigger of ComplexSelector is a <button aria-haspopup="dialog" aria-labelledby={labelId}> whose content is triggerLabel, the value chosen.
Its accessible name is the field label alone, so the value it shows isn't part of its name. axe-core 4.14 reports label-content-name-mismatch (Label in Name, WCAG 2.5.3). 4.14 moved that rule from experimental to a regular wcag21a rule, so it now fails any run with the WCAG 2.1 tags.
Because aria-labelledby overrides the content, the value isn't exposed at all: Chromium's accessibility tree shows button "Supplier", without "Acme Ltd".
Expected: as with Selector, whose trigger has role="combobox", the label names the control and the text it shows is its value. Giving the default trigger role="combobox" would do that. It already has aria-expanded, aria-controls and aria-haspopup="dialog", which ARIA 1.2 allows on a combobox.
Workaround: passing role="combobox" to ComplexSelector works today, because ...rest is spread onto the trigger before Astryx's own attributes.
Related: #6991 (the trigger's required and disabled semantics).
Reproduction
<ComplexSelectorlabel="Supplier"value="1"onChange={()=>{}}triggerLabel="Acme Ltd">{()=><p>Choose a supplier</p>}</ComplexSelector>
Render the above.
Run axe-core 4.14 with the WCAG 2.1 tags, e.g. new AxeBuilder({ page }).withTags(['wcag21a']).analyze().
label-content-name-mismatch is reported on the trigger button: "Text inside the element is not included in the accessible name".
The accessibility tree shows button "Supplier"; "Acme Ltd" isn't exposed.
Thanks for the report. I checked this against current main (commit 4adaeda): the default trigger is already role="combobox" (added in the "ComplexSelector: the trigger is now a combobox whose popup is a dialog" change), so the label names the control and the shown value is its content, as with Selector. A combobox isn't named from its content, so axe's label-content-name-mismatch shouldn't apply to it. I haven't re-run axe 4.14 in a browser myself.
I opened , which adds regression tests for this (the trigger is a combobox named by the label, with the chosen value or placeholder as its content). With role="combobox" removed, the tests fail and show the original button "Supplier" with the value hidden.
@DevThomson, could you check whether you still see the failure on a build that includes the combobox change? You reported it on 0.7.3, and main is at 0.7.5. If not, this issue can probably be closed.
Activity
akhil9tiet commentedon Oct 23, 2026
I'd like to work on this — please assign it to me.
parinith-web commentedon Oct 26, 2026
Thanks for the report. I checked this against current
main(commit 4adaeda): the default trigger is alreadyrole="combobox"(added in the "ComplexSelector: the trigger is now a combobox whose popup is a dialog" change), so the label names the control and the shown value is its content, as withSelector. A combobox isn't named from its content, so axe'slabel-content-name-mismatchshouldn't apply to it. I haven't re-run axe 4.14 in a browser myself.I opened , which adds regression tests for this (the trigger is a combobox named by the label, with the chosen value or placeholder as its content). With
role="combobox"removed, the tests fail and show the originalbutton "Supplier"with the value hidden.@DevThomson, could you check whether you still see the failure on a build that includes the combobox change? You reported it on 0.7.3, and main is at 0.7.5. If not, this issue can probably be closed.
DevThomson commentedon Oct 26, 2026
@parinith-web It's fixed on 0.7.5
You can close this issue
test(ComplexSelector): cover trigger value and placeholder as content (…