Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "DetailsList: only adding `aria-selected` when `selectionMode` is set to `none`.",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "naethell@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export class DetailsRow extends BaseComponent<IDetailsRowProps, IDetailsRowState
const canSelect = selection.canSelectItem!(item);
const isContentUnselectable = selectionMode === SelectionMode.multiple;
const showCheckbox = selectionMode !== SelectionMode.none && checkboxVisibility !== CheckboxVisibility.hidden;
const ariaSelected = (selectionMode === SelectionMode.none) ? undefined : isSelected;

return (
<FocusZone
Expand Down Expand Up @@ -229,7 +230,7 @@ export class DetailsRow extends BaseComponent<IDetailsRowProps, IDetailsRowState
draggable={ isDraggable }
data-automationid='DetailsRow'
style={ { minWidth: viewport ? viewport.width : 0 } }
aria-selected={ isSelected }
aria-selected={ ariaSelected }
allowFocusRoot={ true }
>
{ showCheckbox && (
Expand Down