Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions common/changes/scriby-dropdown-ax-fixes_2017-04-26-10-27.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Dropdown: Fix an issue with screenreaders not reading menu items.",
"type": "patch"
}
],
"email": "chscribn@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class Dropdown extends BaseComponent<IDropdownInternalProps, IDropdownSta
aria-describedby={ id + '-option' }
aria-activedescendant={ isOpen && selectedIndex >= 0 ? (this._id + '-list' + selectedIndex) : null }
aria-disabled={ disabled }
aria-owns={ id + '-list' }
>
<span
id={ id + '-option' }
Expand Down Expand Up @@ -253,6 +254,7 @@ export class Dropdown extends BaseComponent<IDropdownInternalProps, IDropdownSta
className={ css('ms-Dropdown-items', styles.items) }
aria-labelledby={ id + '-label' }
onKeyDown={ this._onZoneKeyDown }
role="listbox"
>
{ this.props.options.map((item, index) => onRenderItem({ ...item, index }, this._onRenderItem)) }
</FocusZone>
Expand Down Expand Up @@ -311,9 +313,9 @@ export class Dropdown extends BaseComponent<IDropdownInternalProps, IDropdownSta
}
) }
onClick={ () => this._onItemClick(item.index) }
role='menu'
role='option'
aria-selected={ this.state.selectedIndex === item.index ? 'true' : 'false' }
aria-label={ item.text }
ariaLabel={ item.text }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created #1621 for this "issue"

> { onRenderOption(item, this._onRenderOption) }</CommandButton>
);
}
Expand Down