Skip to content

Commit

Permalink
Add aria labels for buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbreuler committed May 10, 2021
1 parent 8222fe9 commit 56bde6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Duration Picker/durationPicker/DurationPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,15 @@ export class DurationPicker extends React.Component<IDurationPickerProps, IDurat
return (
<Stack horizontal styles={stackStyles} disableShrink tokens={numericalSpacingStackTokens}>
<Stack styles={stackStyles}>
<IconButton id={Time.Hours} iconProps={{ iconName: upIcon }} styles={buttonStyle}
<IconButton aria-label="Increment Hours" id={Time.Hours} iconProps={{ iconName: upIcon }} styles={buttonStyle}
onMouseDown={() => this.startContinuousIncrement(Time.Hours)}
onMouseUp={() => this.stopContinuousIncrement()}
onMouseOut={() => this.stopContinuousDecrement()}
onKeyDown={(e: React.KeyboardEvent<any>) => this.onKeyDown(e, increment, Time.Hours)}
onKeyUp={this.onKeyUp} />
<TextField styles={narrowTextFieldStyles} value={this.setHoursText()}
onChange={(e: any) => this.onTextChange(e, Time.Hours)} borderless placeholder="--" />
<IconButton id={Time.Hours} iconProps={{ iconName: downIcon }} styles={buttonStyle}
<IconButton aria-label="Decrement Hours" id={Time.Hours} iconProps={{ iconName: downIcon }} styles={buttonStyle}
onMouseDown={() => { this.startContinuousDecrement(Time.Hours) }}
onMouseUp={() => this.stopContinuousDecrement()}
onMouseOut={() => this.stopContinuousDecrement()}
Expand All @@ -376,15 +376,15 @@ export class DurationPicker extends React.Component<IDurationPickerProps, IDurat
<span>:</span>
</Stack>
<Stack styles={stackStyles}>
<IconButton id={Time.Minutes} iconProps={{ iconName: upIcon }} styles={buttonStyle}
<IconButton aria-label="Increment Minutes" id={Time.Minutes} iconProps={{ iconName: upIcon }} styles={buttonStyle}
onMouseDown={() => this.startContinuousIncrement(Time.Minutes)}
onMouseUp={() => this.stopContinuousIncrement()}
onMouseOut={() => this.stopContinuousDecrement()}
onKeyDown={(e: React.KeyboardEvent<any>) => this.onKeyDown(e, increment, Time.Minutes)}
onKeyUp={this.onKeyUp} />
<TextField styles={narrowTextFieldStyles} value={this.setMinutesText()}
onChange={(e: any) => this.onTextChange(e, Time.Minutes)} borderless placeholder="--" />
<IconButton id={Time.Minutes} iconProps={{ iconName: downIcon }} styles={buttonStyle}
<IconButton aria-label="Decrement Hours" id={Time.Minutes} iconProps={{ iconName: downIcon }} styles={buttonStyle}
onMouseDown={() => this.startContinuousDecrement(Time.Minutes)}
onMouseUp={() => this.stopContinuousDecrement()}
onMouseOut={() => this.stopContinuousDecrement()}
Expand Down

0 comments on commit 56bde6a

Please sign in to comment.