Skip to content

C2LC-606: Update aria-label for move to previous and next buttons #351

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

Open
wants to merge 2 commits into
base: develop-1.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions src/ActionPanel.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ describe('ActionPanel options', () => {
pressedStepIndex: 1
});
const moveToPreviousStepButton = getActionPanelOptionButtons(wrapper, 'moveToPreviousStep');
const expectedAriaLabel = "Move Step 1 forward 1 square out of loop A";
const expectedAriaLabel = "Move Step 1 forward 1 square out before loop A";
moveToPreviousStepButton.simulate('click');
expect(moveToPreviousStepButton.get(0).props['aria-label']).toBe(expectedAriaLabel);
expect(mockMoveToPreviousStep.mock.calls.length).toBe(1);
Expand All @@ -259,7 +259,7 @@ describe('ActionPanel options', () => {
pressedStepIndex: 2
});
const moveToPreviousStepButton = getActionPanelOptionButtons(wrapper, 'moveToPreviousStep');
const expectedAriaLabel = "Move Step 3 forward 1 square into loop A";
const expectedAriaLabel = "Move Step 3 forward 1 square into the end of loop A";
moveToPreviousStepButton.simulate('click');
expect(moveToPreviousStepButton.get(0).props['aria-label']).toBe(expectedAriaLabel);
expect(mockMoveToPreviousStep.mock.calls.length).toBe(1);
Expand Down Expand Up @@ -448,7 +448,7 @@ describe('ActionPanel options', () => {
pressedStepIndex: 1
});
const moveToNextStepButton = getActionPanelOptionButtons(wrapper, 'moveToNextStep');
const expectedAriaLabel = "Move Step 1 forward 1 square out of loop A";
const expectedAriaLabel = "Move Step 1 forward 1 square out after loop A";
moveToNextStepButton.simulate('click');
expect(moveToNextStepButton.get(0).props['aria-label']).toBe(expectedAriaLabel);
expect(mockMoveToNextStep.mock.calls.length).toBe(1);
Expand All @@ -469,7 +469,7 @@ describe('ActionPanel options', () => {
pressedStepIndex: 0
});
const moveToNextStepButton = getActionPanelOptionButtons(wrapper, 'moveToNextStep');
const expectedAriaLabel = "Move Step 1 forward 1 square into loop A";
const expectedAriaLabel = "Move Step 1 forward 1 square into the beginning of loop A";
moveToNextStepButton.simulate('click');
expect(moveToNextStepButton.get(0).props['aria-label']).toBe(expectedAriaLabel);
expect(mockMoveToNextStep.mock.calls.length).toBe(1);
Expand Down
8 changes: 4 additions & 4 deletions src/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@
"Command.right180": "turn right 180 degrees",
"Command.startLoop": "beginning of loop {loopLabel}",
"CommandInfo.previousStep": "before step {previousStepNumber} {command}",
"CommandInfo.previousStep.endLoop": "into loop {loopLabel}",
"CommandInfo.previousStep.endLoop": "into the end of loop {loopLabel}",
"CommandInfo.previousStep.inLoop": "before step {previousStepNumber} {command} of loop {loopLabel}",
"CommandInfo.previousStep.loop": "before step {previousStepNumber} {command}",
"CommandInfo.previousStep.startLoop": "out of loop {loopLabel}",
"CommandInfo.previousStep.startLoop": "out before loop {loopLabel}",
"CommandInfo.nextStep": "after step {nextStepNumber} {command}",
"CommandInfo.nextStep.endLoop": "out of loop {loopLabel}",
"CommandInfo.nextStep.endLoop": "out after loop {loopLabel}",
"CommandInfo.nextStep.inLoop": "after step {nextStepNumber} {command} of loop {loopLabel}",
"CommandInfo.nextStep.loop": "after step {nextStepNumber} {command}",
"CommandInfo.nextStep.startLoop": "into loop {loopLabel}",
"CommandInfo.nextStep.startLoop": "into the beginning of loop {loopLabel}",
"CommandPalette.controlsTitle": "Controls",
"CommandPalette.movementsTitle": "Movements",
"CommandPalette.shortMovementsTitle": "Move",
Expand Down