Skip to content

Commit

Permalink
fix RAI dashboard treat as categorical accessibility on new cohort cr…
Browse files Browse the repository at this point in the history
…eate (#2446)
  • Loading branch information
imatiach-msft authored Dec 6, 2023
1 parent d6d8c78 commit ae56171
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@ export class CohortEditorFilter extends React.Component<ICohortEditorFilterProps
label={localization.Interpret.CohortEditor.TreatAsCategorical}
checked={isCategorical}
onChange={this.props.setAsCategorical}
ariaLabel={
isCategorical
? localization.formatString(
localization.Interpret.CohortEditor
.TreatAsCategoricalAriaLabelChecked,
categoricalOptions?.length
)
: localization.formatString(
localization.Interpret.CohortEditor
.TreatAsCategoricalAriaLabelUnchecked,
columnRange.min,
columnRange.max
)
}
/>
)}
{isCategorical ? (
Expand Down
2 changes: 2 additions & 0 deletions libs/localization/src/lib/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@
"regressionError": "Error"
},
"TreatAsCategorical": "Treat as categorical",
"TreatAsCategoricalAriaLabelChecked": "Treat as categorical checked, number of unique values: {0}",
"TreatAsCategoricalAriaLabelUnchecked": "Treat as categorical unchecked, min value: {0}, max value: {1}",
"_TreatAsCategorical.comment": "a checkbox label to treat integers as categories instead of as numbers",
"_addFilter.comment": "button text to add the current settings as a new filter",
"_addedFilters.comment": "header above the list of filters that have been saved",
Expand Down

0 comments on commit ae56171

Please sign in to comment.