Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-Jira] Localize ARIA labels #824

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ describe('ContactDetailsPartnerAccounts', () => {
getByRole('textbox', { name: 'Account Number' }),
'new-account',
);
userEvent.click(getByRole('button', { name: 'submit' }));
userEvent.click(getByRole('button', { name: 'Submit' }));
await waitFor(() =>
expect(
queryByRole('textbox', { name: 'Account Number' }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const ContactDetailsPartnerAccounts: React.FC<
required
/>
<IconButton
aria-label="submit"
aria-label={t('Submit')}
type="submit"
disabled={isSubmitting || !isValid || updating}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ describe('EditPartnershipInfoModal', () => {
</LocalizationProvider>
</SnackbarProvider>,
);
const datePickerButton = getByLabelText('change start date');
const datePickerButton = getByLabelText('Change start date');
userEvent.click(datePickerButton);

const day = await waitFor(async () => getAllByText('30')[0]);
Expand Down Expand Up @@ -723,7 +723,7 @@ describe('EditPartnershipInfoModal', () => {
</LocalizationProvider>
</SnackbarProvider>,
);
const datePickerButton = getByLabelText('change next ask date');
const datePickerButton = getByLabelText('Change next ask date');
userEvent.click(datePickerButton);

const day = await waitFor(async () => getAllByText('30')[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ export const EditPartnershipInfoModal: React.FC<
InputProps={{
endAdornment: (
<InputAdornment
aria-label="change start date"
aria-label={t('Change start date')}
position="end"
>
<CalendarToday />
Expand Down Expand Up @@ -630,7 +630,7 @@ export const EditPartnershipInfoModal: React.FC<
InputProps={{
endAdornment: (
<InputAdornment
aria-label="change next ask date"
aria-label={t('Change next ask date')}
position="end"
>
<CalendarToday />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ describe('PartnerCare', () => {
'Prayer (2,560)',
);
userEvent.click(
queryAllByRole('button', { hidden: true, name: 'Complete Button' })[0],
queryAllByRole('button', { hidden: true, name: 'Complete' })[0],
);
expect(openTaskModal).toHaveBeenCalledWith({
taskId: 'task_1',
Expand Down Expand Up @@ -269,7 +269,7 @@ describe('PartnerCare', () => {
'John DoeJan 1',
);
userEvent.click(
queryAllByRole('button', { hidden: true, name: 'Complete Button' })[0],
queryAllByRole('button', { hidden: true, name: 'Complete' })[0],
);
expect(openTaskModal).toHaveBeenCalledWith({
view: 'add',
Expand Down Expand Up @@ -299,7 +299,7 @@ describe('PartnerCare', () => {
);
expect(queryByTestId('CelebrationItem-3')).toBeInTheDocument();
userEvent.click(
queryAllByRole('button', { hidden: true, name: 'Complete Button' })[2],
queryAllByRole('button', { hidden: true, name: 'Complete' })[2],
);
expect(openTaskModal).toHaveBeenCalledWith({
view: 'add',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dashboard/ThisWeek/PartnerCare/PartnerCare.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ const PartnerCare = ({
<ListItemSecondaryAction>
<CompleteButton
role="button"
aria-label="Complete Button"
aria-label={t('Complete')}
onClick={() => handleCompleteClick(task)}
>
<Brightness1Outlined name="Circle Icon" />
Expand Down Expand Up @@ -461,7 +461,7 @@ const PartnerCare = ({
<ListItemSecondaryAction>
<CompleteButton
role="button"
aria-label="Complete Button"
aria-label={t('Complete')}
onClick={() =>
handleCreateClick(
person.birthdayDay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ export const ExpectedMonthlyTotalReportTable: React.FC<Props> = ({
</AccordionSummary>
<AccordionDetails>
<TableContainer component={Paper}>
<Table style={{ minWidth: 700 }} aria-label="customized table">
<Table
style={{ minWidth: 700 }}
aria-label={t('Expected monthly total report table')}
>
<TableHead>
<TableRow>
<TableCell align="left">{t('Partner')}</TableCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('FourteenMonthReportActions', () => {
);

expect(
getByRole('group', { hidden: true, name: 'report header button group' }),
getByRole('group', { hidden: true, name: 'Report header button group' }),
).toBeInTheDocument();
userEvent.click(getByRole('button', { hidden: true, name: 'Expand' }));
userEvent.click(getByRole('button', { hidden: true, name: 'Print' }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const FourteenMonthReportActions: React.FC<
const { t } = useTranslation();

return (
<ButtonGroup aria-label="report header button group">
<ButtonGroup aria-label={t('Report header button group')}>
<Button
startIcon={
<SvgIcon fontSize="small">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const FourteenMonthReportTable: React.FC<
<PrintableContainer className="fourteen-month-report">
<StickyTable
stickyHeader={true}
aria-label="fourteen month report table"
aria-label={t('Fourteen month report table')}
data-testid="FourteenMonthReport"
>
<TableHead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const PartnerGivingAnalysisReportTable: FC<
<StickyTableContainer>
<StickyTable
stickyHeader={true}
aria-label="partner giving analysis report table"
aria-label={t('Partner giving analysis report table')}
data-testid="PartnerGivingAnalysisReport"
>
<TableHead
Expand Down
2 changes: 1 addition & 1 deletion src/components/Shared/Filters/FilterPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ export const FilterPanel: React.FC<FilterPanelProps & BoxProps> = ({
secondaryAction={
<IconButton
edge="end"
aria-label="delete"
aria-label={t('Delete')}
data-testid="deleteSavedFilter"
onClick={() =>
handleDeleteSavedFilter(filter)
Expand Down
Loading