fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Accessibility][Dropdown][Fluentui]: Accessibility issues when using options with dividers and headers

Open levymsft opened this issue 5 years ago • 3 comments

Environment Information

  • Package version(s): "office-ui-fabric-react": "7.165.0"
  • Browser and OS versions: Edge Version 89.0.774.57 (Official build) (64-bit) Windows Version 10.0.19042 Build 19042

Describe the issue:

The dropdown component is causing accessibility issues when used with options containing headers and dividers. To reproduce: 1-render the code bellow 2-select the dropdown so that all options will be listed 3-run Microsoft accessibility test 4- aria-allowed-attr and aria-required-parent issues will be shown on the errors list

const Content = () => {
  const options = [
      {
        key: 'all',
        text: 'All builds'
      },
      {
        key: 'all-divider',
        text: '-',
        itemType: DropdownMenuItemType.Divider
      },
      {
        key: 'CurrentChannel-divider',
        text: '-',
        itemType: DropdownMenuItemType.Divider
      },
      {
        key: 'Currentchannel-header',
        text: 'CurrrentChannel',
        itemType: DropdownMenuItemType.Header
      },
      {
        key: 'CurrentChannel-16.0.13901.20066',
        text: '2020 16.0.13901.20066',
      },
      {
        key: 'CurrentChannel-17.0.13901.20066',
        text: '2020 17.0.13901.20066',
      },
  ];
  
  return (
    <Dropdown
      label='Test'
      id='DropDownTest'
      multiSelect={true}
      options={options}
      />
  );
};

Actual behavior:

After the test accessibility issues are found.

Expected behavior:

No accessibility issues.

If applicable, please provide a codepen repro:

https://codepen.io/lmoreira/pen/QWdWvYP

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? No

Requested priority: High (breaking accessibility)

Products/sites affected: (config.office.com)

levymsft avatar Mar 22 '21 22:03 levymsft

@levymsft - thanks for filing this item and sharing the details around the accessibility issue.

@TristanWatanabe - Would you be able to confirm if this is a regression, or if this behavior is an accessibility issue? cc @smhigley

gouttierre avatar May 25 '21 10:05 gouttierre

@levymsft @gouttierre this is a duplicate of #17838 and is actually an issue with axe-core as further explained here: https://github.com/microsoft/fluentui/issues/17838#issuecomment-824442277

TristanWatanabe avatar May 26 '21 19:05 TristanWatanabe

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 Feb 04 '22 19:02 msft-fluent-ui-bot