Skip to content

Commit

Permalink
screen reader support for error case
Browse files Browse the repository at this point in the history
  • Loading branch information
Advitya17 committed Nov 16, 2023
1 parent b6eabfe commit 7abeb6a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export class CohortToolBar extends React.Component<
<Text
className={classNames.errorMessage}
variant="mediumPlus"
aria-label={this.state.errorMessage}
>
{this.state.errorMessage}
</Text>
Expand All @@ -130,10 +131,12 @@ export class CohortToolBar extends React.Component<
<PrimaryButton
onClick={this.addCohortWrapper(true)}
text={localization.InterpretVision.Cohort.saveAndSwitch}
ariaLabel={this.state.errorMessage ? this.state.errorMessage : undefined}
/>
<DefaultButton
onClick={this.addCohortWrapper(false)}
text={localization.InterpretVision.Cohort.saveAndClose}
ariaLabel={this.state.errorMessage ? this.state.errorMessage : undefined}
/>
</DialogFooter>
</Stack.Item>
Expand Down

0 comments on commit 7abeb6a

Please sign in to comment.