Skip to content

Commit

Permalink
Merge pull request microsoft#84 from zoarif/zoarif/DetailsListAriaSel…
Browse files Browse the repository at this point in the history
…ected

Zoarif/details list aria selected
  • Loading branch information
zoarif authored Aug 8, 2016
2 parents 9f1f4fd + 82f6931 commit 4cd514a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 35 deletions.
70 changes: 35 additions & 35 deletions src/components/DetailsList/DetailsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,43 +236,43 @@ export class DetailsList extends React.Component<IDetailsListProps, IDetailsList
/>
) }
</div>
</div>
<div ref='contentContainer' onKeyDown={ this._onContentKeyDown }>
<FocusZone
ref='focusZone'
direction={ FocusZoneDirection.vertical }
isInnerZoneKeystroke={ (ev) => (ev.which === getRTLSafeKeyCode(KeyCodes.right)) }
onActiveElementChanged={ this._onActiveRowChanged }
>
<SelectionZone
selection={ selection }
selectionMode={ selectionMode }
onItemInvoked={ onItemInvoked }>
{ groups ? (
<GroupedList
groups={ groups }
groupProps={ groupProps }
items={ items }
onRenderCell={ this._onRenderCell }
selection={ selection }
selectionMode={ selectionMode }
dragDropEvents={ dragDropEvents }
dragDropHelper={ dragDropHelper }
eventsToRegister={ rowElementEventMap }
listProps={ additionalListProps }
ref='groups'
/>
) : (
<List
<div ref='contentContainer' onKeyDown={ this._onContentKeyDown }>
<FocusZone
ref='focusZone'
direction={ FocusZoneDirection.vertical }
isInnerZoneKeystroke={ (ev) => (ev.which === getRTLSafeKeyCode(KeyCodes.right)) }
onActiveElementChanged={ this._onActiveRowChanged }
>
<SelectionZone
selection={ selection }
selectionMode={ selectionMode }
onItemInvoked={ onItemInvoked }>
{ groups ? (
<GroupedList
groups={ groups }
groupProps={ groupProps }
items={ items }
onRenderCell={ (item, itemIndex) => this._onRenderCell(0, item, itemIndex) }
{ ...additionalListProps }
ref='list'
onRenderCell={ this._onRenderCell }
selection={ selection }
selectionMode={ selectionMode }
dragDropEvents={ dragDropEvents }
dragDropHelper={ dragDropHelper }
eventsToRegister={ rowElementEventMap }
listProps={ additionalListProps }
ref='groups'
/>
)
}
</SelectionZone>
</FocusZone>
) : (
<List
items={ items }
onRenderCell={ (item, itemIndex) => this._onRenderCell(0, item, itemIndex) }
{ ...additionalListProps }
ref='list'
/>
)
}
</SelectionZone>
</FocusZone>
</div>
</div>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/DetailsList/DetailsRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export class DetailsRow extends React.Component<IDetailsRowProps, IDetailsRowSta
data-is-draggable={ isDraggable }
data-automationid='DetailsRow'
style={ { minWidth: viewport ? viewport.width : 0 } }
aria-selected={ isSelected }
>
<FocusZone direction={ FocusZoneDirection.horizontal }>
{ (selectionMode !== SelectionMode.none) && (
Expand Down

0 comments on commit 4cd514a

Please sign in to comment.