mirror of
https://github.com/desktop/desktop
synced 2024-10-31 11:07:25 +00:00
Merge pull request #17142 from desktop/fix-section-aria-label
Fix aria-label of branches list groups when some of the groups is not present
This commit is contained in:
commit
4710fce429
1 changed files with 3 additions and 6 deletions
|
@ -291,12 +291,9 @@ export class BranchList extends React.Component<
|
|||
}
|
||||
|
||||
private getGroupAriaLabel = (group: number) => {
|
||||
const GroupIdentifiers: ReadonlyArray<BranchGroupIdentifier> = [
|
||||
'default',
|
||||
'recent',
|
||||
'other',
|
||||
]
|
||||
return this.getGroupLabel(GroupIdentifiers[group])
|
||||
const identifier = this.state.groups[group]
|
||||
.identifier as BranchGroupIdentifier
|
||||
return this.getGroupLabel(identifier)
|
||||
}
|
||||
|
||||
private renderGroupHeader = (label: string) => {
|
||||
|
|
Loading…
Reference in a new issue