fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

a11y: Mutliselect dropdown with ariaLabel: Narrator does not announce selected items

Open jgage176 opened this issue 6 years ago • 5 comments

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

jgage176 avatar Aug 18 '20 00:08 jgage176

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:

  1. aria-selected cannot be set on elements with their role set to button, this causes the list of selected items to not read selected at the end. I think this is by design since multiselection is more difficult to relay by just using aria-selected.
  2. The way we set the component to read the selected options on multiselect Dropdowns is by by using aria-labelledby, which we use only when the aria-label attribute 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.

khmakoto avatar Aug 18 '20 22:08 khmakoto

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!

joschect avatar Aug 19 '20 00:08 joschect

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.

image

abhishek-msft avatar Apr 12 '21 11:04 abhishek-msft

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?

jgage176 avatar Oct 04 '21 15:10 jgage176

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.

msft-fluent-ui-bot avatar Apr 02 '22 16:04 msft-fluent-ui-bot