a11y: Mutliselect dropdown with ariaLabel: Narrator does not announce selected items
Here is a CodePen that goes through three examples, the first two where Office Fabric correctly handles the ariaLabel and reading off the selected items, the third, which this bug is for, it does not: https://codepen.io/jgage176/pen/bGGzGvJ. If you use a label, it works fine, but if you don't want a label and just specify an ariaLabel then it does not work correctly, which is in contrast to the single select behavior and breaks the a11y rule. Also, a side not, is the multi-select that does work, does not say the word "Selected", which in itself is also a bug, it just says the list of selected items without saying "Selected". I added extra labels to make looking at it easier, but when I say without labels I'm just adding my own
Hi @jgage176 thanks for filing this issue! So, there seems to be 2 separate things both originating from the fact that we have set role: button for the multiselect Dropdown:
aria-selectedcannot be set on elements with theirroleset tobutton, this causes the list of selected items to not readselectedat the end. I think this is by design since multiselection is more difficult to relay by just usingaria-selected.- The way we set the component to read the selected options on multiselect
Dropdownsis by by usingaria-labelledby, which we use only when thearia-labelattribute is not provided. I think this approach might be short-sighted on our part but I'd be interested in knowing what @joschect thinks about how we could handle this.
Hey! @khmakoto I think you're totally right about 1.
I am however, pretty confused about why 2 doesn't work. They both provide very similar information and it doesn't look like the multiselect field really does anything that different in this particular instance. I think we'll need to investigate a bit more. I wonder if this is potentially a bug in narrator. Alternatively I also think that @khmakoto could be correct in that the problem is somehow related to the role being "button". This is a bug and we'll take a look!
Is this also related to the same? Was getting the same issue on my local project, so though of testing in the documentation page. Here too the issue is the same - For Multi Select dropdown, we get two issues identified in the Accessibility Insights tool Fast Pass.

I am still being flagged for this in our internal website by the accessibility team. It must say "Selected" at the end of reading what items are selected. Are there any updates planned to address this?
Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.
Still require assistance? Please, create a new issue with up-to date details.