Skip to content

Commit

Permalink
refined labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Advitya17 committed Nov 20, 2023
1 parent 7081ced commit de84b26
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class CohortEditor extends React.PureComponent<
disabled={this.props.deleteIsDisabled}
onClick={this.deleteCohort}
className={styles.deleteCohort}
ariaLabel="Delete cohort button"
ariaLabel={localization.Interpret.CohortEditor.deleteAriaLabel}
>
{localization.Interpret.CohortEditor.delete}
</DefaultButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class CohortList extends React.PureComponent<ICohortListProps> {
text={localization.Interpret.CohortBanner.addCohort}
iconProps={{ iconName: "Add" }}
styles={{ label: { whiteSpace: "nowrap" } }}
ariaLabel="New cohort button"
ariaLabel={localization.Interpret.CohortBanner.addCohort}
/>
<DefaultButton
disabled={!this.props.jointDataset.dataDict?.length}
Expand All @@ -48,7 +48,7 @@ export class CohortList extends React.PureComponent<ICohortListProps> {
iconProps={{ iconName: "Edit" }}
styles={{ label: { whiteSpace: "nowrap" } }}
ariaLabel={
localization.Interpret.CohortBanner.editCohortAriaLabel
localization.Interpret.CohortBanner.editCohort
}
/>
</Stack>
Expand Down
8 changes: 2 additions & 6 deletions libs/core-ui/src/lib/components/ConfirmationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,12 @@ export class ConfirmationDialog extends React.Component<IConfirmationDialogProps
<PrimaryButton
onClick={this.props.onConfirm}
text={this.props.confirmButtonText}
ariaLabel={
localization.Interpret.CohortEditor.confirmButtonAriaLabel
}
ariaLabel={this.props.confirmButtonText}
/>
<DefaultButton
onClick={this.props.onClose}
text={this.props.cancelButtonText}
ariaLabel={
localization.Interpret.CohortEditor.cancelButtonAriaLabel
}
ariaLabel={this.props.cancelButtonText}
/>
</DialogFooter>
</Dialog>
Expand Down
2 changes: 1 addition & 1 deletion libs/counterfactuals/src/lib/CounterfactualPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class CounterfactualPanel extends React.Component<
className={classes.button}
text={localization.Counterfactuals.saveAsNew}
onClick={this.handleSavePoint}
ariaLabel={localization.Counterfactuals.saveAsNewAriaLabel}
ariaLabel={localization.Counterfactuals.saveAsNew}
/>
</Stack.Item>
<Stack.Item align="end" grow={3}>
Expand Down
2 changes: 1 addition & 1 deletion libs/fairness/src/lib/Controls/IntroTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class IntroTab extends React.PureComponent<IIntroTabProps> {
id="nextButton"
className={styles.getStarted}
onClick={this.onNext}
ariaLabel={localization.Fairness.Intro.getStartedAriaLabel}
ariaLabel={localization.Fairness.Intro.getStarted}
>
{localization.Fairness.Intro.getStarted}
</PrimaryButton>
Expand Down
4 changes: 2 additions & 2 deletions libs/fairness/src/lib/Controls/WizardFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export class WizardFooter extends React.PureComponent<IWizardFooterProps> {
className={styles.next}
text={localization.Fairness.Footer.next}
onClick={this.onNext}
ariaLabel={localization.Fairness.Footer.nextAriaLabel}
ariaLabel={localization.Fairness.Footer.next}
/>
{!!this.props.previousTabKey && (
<DefaultButton
className={styles.back}
text={localization.Fairness.Footer.back}
onClick={this.onPrevious}
ariaLabel={localization.Fairness.Footer.backAriaLabel}
ariaLabel={localization.Fairness.Footer.back}
/>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class CohortToolBar extends React.Component<
<PrimaryButton
text={localization.InterpretVision.Cohort.save}
onClick={this.openDialogue}
ariaLabel={localization.Interpret.CohortEditor.saveAriaLabel}
ariaLabel={localization.InterpretVision.Cohort.save}
/>
</Stack.Item>
</Stack>
Expand Down
39 changes: 15 additions & 24 deletions libs/localization/src/lib/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
},
"ShiftCohort": {
"apply": "Apply",
"applyAriaLabel": "Apply cohort button",
"applyAriaLabel": "Apply cohort",
"cancel": "Cancel",
"title": "Switch Cohort",
"subText": "Select a cohort from the cohort list. Apply the cohort to the dashboard.",
Expand Down Expand Up @@ -155,7 +155,7 @@
"counterfactualName": "What-if counterfactual name",
"createWhatIfCounterfactual": "Create what-if counterfactual",
"createCounterfactual": "Counterfactual",
"counterfactualAriaLabel": "Counterfactual creation button",
"counterfactualAriaLabel": "Counterfactual creation",
"revertToBubbleChart": "View bubble chart",
"createOwn": "Create your own counterfactual:",
"currentClass": "Current class",
Expand All @@ -181,7 +181,6 @@
"recommendedPolicy": "Recommended policy gain",
"referenceDatapoint": "Reference datapoint: Row {0}",
"saveAsNew": "Save as new datapoint",
"saveAsNewAriaLabel": "Save as new datapoint button",
"saveDescription": "These counterfactuals are based on the model's prediction, and therefore may be capturing the same correlations that were picked up by the model. We do not advise users to make real-life decisions based on this tool. Use our toolkit for causal analysis for real-life decision-making scenarios.",
"seePrediction": "See prediction deltas",
"selectedDatapoint": "Selected datapoint",
Expand Down Expand Up @@ -486,13 +485,13 @@
},
"BinDialog": {
"cancel": "Cancel",
"cancelAriaLabel": "Cancel binning button",
"cancelAriaLabel": "Cancel binning",
"categoryHeader": "Bin values:",
"header": "Configure bins",
"makeCategorical": "Treat as categorical",
"numberOfBins": "Number of bins:",
"save": "Save",
"saveAriaLabel": "Save binning button"
"saveAriaLabel": "Save binning"
},
"DropdownHeaders": {
"errorMetric": "Enable error bars",
Expand Down Expand Up @@ -531,9 +530,7 @@
},
"Footer": {
"back": "Back",
"backAriaLabel": "Back button",
"next": "Next",
"nextAriaLabel": "Next button"
},
"Header": {
"documentation": "Documentation",
Expand All @@ -547,7 +544,6 @@
"features": "Sensitive features",
"featuresInfo": "Sensitive features are used to split your data into groups. Fairness of your model across these groups is measured by fairness metrics. Fairness metrics quantify how much your model's behavior varies across these groups.",
"getStarted": "Get started",
"getStartedAriaLabel": "Get started button",
"introBody": "The fairness dashboard enables you to assess tradeoffs between performance and fairness of your models",
"performance": "Performance metric",
"performanceInfo": "Performance metrics are used to evaluate the overall quality of your model as well as the quality of your model in each group. The difference between the extreme values of the performance metric across the groups is reported as the disparity in performance.",
Expand Down Expand Up @@ -901,7 +897,6 @@
"duplicateCohort": "Duplicate",
"edit": "Edit",
"editCohort": "Edit cohort",
"editCohortAriaLabel": "Edit cohort button",
"features": "{0} features",
"filters": "{0} filters",
"multiclassClassifier": "Multiclass classifier",
Expand Down Expand Up @@ -929,33 +924,31 @@
"_placeholderName.comment": "starting name for a new cohort",
"_selectFilter.comment": "prompt to select an attribute to filter on",
"addFilter": "Add filter",
"addFilterAriaLabel": "Add cohort filter button",
"addFilterAriaLabel": "Add cohort filter",
"addedFilters": "Filters",
"cancel": "Cancel",
"cancelAriaLabel": "Cancel cohort button",
"cancelAriaLabel": "Cancel cohort",
"cancelExistingCohort": "Are you sure you want to cancel editing cohort and go back?",
"cancelNewCohort": "Are you sure you want to cancel creating a new cohort and go back?",
"cancelNo": "No",
"cancelButtonAriaLabel": "Cancel button",
"cancelTitle": "Cancel cohort",
"cancelYes": "Yes",
"confirmButtonAriaLabel": "Confirm button",
"cohortNameError": "Missing cohort name",
"cohortNameDupError": "Cohort with same name already exists",
"cohortNameLabel": "Dataset cohort name",
"cohortNamePlaceholder": "Name your cohort",
"clearAllFilters": "Clear all filters",
"defaultFilterState": "Select a filter to add parameters to your dataset cohort. Filters from your current viewing cohort are pre-populated.",
"delete": "Delete",
"deleteAriaLabel": "Delete cohort button",
"deleteAriaLabel": "Delete cohort",
"invalidValueError": "Value should be between {0} and {1}",
"minimumGreaterThanMaximum": "Minimum value inputs must be less than maximum value inputs.",
"noAddedFilters": "No filters",
"placeholderName": "Cohort {0}",
"save": "Save",
"saveAriaLabel": "Save cohort button",
"saveAriaLabel": "Save cohort",
"saveAndSwitch": "Save and switch",
"saveAndSwitchAriaLabel": "Save and switch cohort button",
"saveAndSwitchAriaLabel": "Save and switch cohort",
"selectFilter": "Select filter",
"noFiltersApplied": "No filters applied",
"filterAdded": "Filter added"
Expand Down Expand Up @@ -1444,7 +1437,7 @@
"itemsSelectedPlural": "items selected",
"save": "Save cohort",
"saveAndClose": "Save and close",
"saveAndCloseAriaLabel": "Save and close cohort button",
"saveAndCloseAriaLabel": "Save and close cohort",
"saveAndSwitch": "Save and switch",
"textField": "New cohort name",
"title": "Save new cohort"
Expand Down Expand Up @@ -1496,7 +1489,7 @@
"ModelAssessment": {
"AddingTab": {
"AddButtonText": "Add",
"AddButtonTextAriaLabel": "Add tab button",
"AddButtonTextAriaLabel": "Add tab",
"CalloutContent": "Adding some components (error tree view, error heat map) will allow you to filter down the data from the global cohort that you see in the components below.",
"CalloutTitle": "Add component",
"TabAddedMessage": {
Expand Down Expand Up @@ -1525,16 +1518,16 @@
"Cohort": {
"apply": "Apply",
"delete": "Delete",
"deleteAriaLabel": "Delete cohort button",
"deleteAriaLabel": "Delete cohort",
"cancel": "Cancel",
"cancelAriaLabel": "Cancel cohort button",
"cancelAriaLabel": "Cancel cohort",
"cohortInfo": "Cohort info",
"cohortList": "Cohort list",
"deleteCohort": "Deleting {0}?",
"deleteConfirm": "Are you sure you want to delete this cohort?",
"selectCohort": "Select a cohort",
"shiftCohort": "Switch cohort",
"shiftCohortAriaLabel": "Switch cohort button",
"shiftCohortAriaLabel": "Switch cohort",
"shiftCohortDescription": "Select a cohort from the cohort list. Apply the cohort to the dashboard."
},
"CohortInformation": {
Expand Down Expand Up @@ -1904,9 +1897,7 @@
"upperQuartile": "Upper quartile"
},
"chartConfigApply": "Apply",
"chartConfigApplyAriaLabel": "Apply button",
"chartConfigCancel": "Cancel",
"chartConfigCancelAriaLabel": "Cancel button",
"chartConfigDatasetCohortSelectionPlaceholder": "Select dataset cohorts",
"chartConfigFeatureBasedCohortSelectionPlaceholder": "Select feature-based cohorts",
"confusionMatrix": {
Expand Down Expand Up @@ -2016,7 +2007,7 @@
"cohortList": "Time series list",
"selectCohort": "Select a time series",
"shiftCohort": "Switch time series",
"shiftCohortAriaLabel": "Switch time series button",
"shiftCohortAriaLabel": "Switch time series",
"shiftCohortDescription": "Select a time series from the time series list. Apply the time series to the dashboard."
},
"TimeSeriesSettings": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,14 @@ export class ChartConfigurationFlyout extends React.Component<
this.state.newlySelectedFeatureBasedCohorts
)}
ariaLabel={
localization.ModelAssessment.ModelOverview.chartConfigApplyAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigApply
}
/>
<DefaultButton
onClick={this.onDismiss}
text={localization.ModelAssessment.ModelOverview.chartConfigCancel}
ariaLabel={
localization.ModelAssessment.ModelOverview
.chartConfigCancelAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigCancel
}
/>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,14 @@ export class FeatureConfigurationFlyout extends React.Component<
(!featureSelectionChanged && !continuousFeatureBinningChanged)
}
ariaLabel={
localization.ModelAssessment.ModelOverview
.chartConfigApplyAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigApply
}
/>
<DefaultButton
onClick={this.props.onDismissFlyout}
text={localization.ModelAssessment.ModelOverview.chartConfigCancel}
ariaLabel={
localization.ModelAssessment.ModelOverview
.chartConfigCancelAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigCancel
}
/>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,14 @@ export class MetricConfigurationFlyout extends React.Component<
text={localization.ModelAssessment.ModelOverview.chartConfigApply}
disabled={noMetricsSelected}
ariaLabel={
localization.ModelAssessment.ModelOverview
.chartConfigApplyAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigApply
}
/>
<DefaultButton
onClick={this.props.onDismissFlyout}
text={localization.ModelAssessment.ModelOverview.chartConfigCancel}
ariaLabel={
localization.ModelAssessment.ModelOverview
.chartConfigCancelAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigCancel
}
/>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class ModelOverviewMetricChart extends React.Component<
}}
text={localization.ModelAssessment.ModelOverview.chartConfigApply}
ariaLabel={
localization.ModelAssessment.ModelOverview.chartConfigApplyAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigApply
}
/>
<DefaultButton
Expand All @@ -189,8 +189,7 @@ export class ModelOverviewMetricChart extends React.Component<
}}
text={localization.ModelAssessment.ModelOverview.chartConfigCancel}
ariaLabel={
localization.ModelAssessment.ModelOverview
.chartConfigCancelAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigCancel
}
/>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class ProbabilityDistributionChart extends React.Component<
}}
text={localization.ModelAssessment.ModelOverview.chartConfigApply}
ariaLabel={
localization.ModelAssessment.ModelOverview.chartConfigApplyAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigApply
}
/>
<DefaultButton
Expand All @@ -219,8 +219,7 @@ export class ProbabilityDistributionChart extends React.Component<
}}
text={localization.ModelAssessment.ModelOverview.chartConfigCancel}
ariaLabel={
localization.ModelAssessment.ModelOverview
.chartConfigCancelAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigCancel
}
/>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export class RegressionDistributionChart extends React.Component<
}}
text={localization.ModelAssessment.ModelOverview.chartConfigApply}
ariaLabel={
localization.ModelAssessment.ModelOverview.chartConfigApplyAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigApply
}
/>
<DefaultButton
Expand All @@ -278,8 +278,7 @@ export class RegressionDistributionChart extends React.Component<
}}
text={localization.ModelAssessment.ModelOverview.chartConfigCancel}
ariaLabel={
localization.ModelAssessment.ModelOverview
.chartConfigCancelAriaLabel
localization.ModelAssessment.ModelOverview.chartConfigCancel
}
/>
</Stack>
Expand Down

0 comments on commit de84b26

Please sign in to comment.