Skip to content

Commit 79c6f54

Browse files
authored
Merge branch 'add-screen-reader-support-experimental' into main
2 parents b38e758 + 458e4f8 commit 79c6f54

File tree

5 files changed

+38
-63
lines changed

5 files changed

+38
-63
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66
pull_request:
77
push:
88
branches:
9-
- main
9+
- add-screen-reader-support-experimental
1010

1111
permissions:
1212
contents: read
1313

1414
jobs:
1515
build_tip_of_tree_v12:
16-
name: Build test (against tip-of-tree core develop)
16+
name: Build test (against add-screen-reader-support-experimental core develop)
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout experimentation plugin
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@v4
2626
with:
2727
repository: 'google/blockly'
28-
ref: 'develop'
28+
ref: 'add-screen-reader-support-experimental'
2929
path: core-blockly
3030

3131
- name: Use Node.js 20.x
@@ -42,7 +42,7 @@ jobs:
4242
npm install
4343
cd ..
4444
45-
- name: Link latest Blockly develop
45+
- name: Link latest Blockly add-screen-reader-support-experimental
4646
run: |
4747
cd core-blockly
4848
npm run package
@@ -57,26 +57,6 @@ jobs:
5757
cd main
5858
npm run build
5959
60-
build:
61-
name: Build test (against pinned v12)
62-
# Don't run pinned version checks for PRs.
63-
if: ${{ !github.base_ref }}
64-
runs-on: ubuntu-latest
65-
steps:
66-
- name: Checkout experimentation plugin
67-
uses: actions/checkout@v4
68-
69-
- name: Use Node.js 20.x
70-
uses: actions/setup-node@v4
71-
with:
72-
node-version: 20.x
73-
74-
- name: NPM install
75-
run: npm install
76-
77-
- name: Verify build
78-
run: npm run build
79-
8060
lint:
8161
name: Eslint check
8262
timeout-minutes: 5

.github/workflows/test.yml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
pull_request:
88
push:
99
branches:
10-
- main
10+
- add-screen-reader-support-experimental
1111

1212
permissions:
1313
contents: read
1414

1515
jobs:
16-
webdriverio_tests_tip_of_tree_v12:
17-
name: WebdriverIO tests (against tip-of-tree core develop)
16+
webdriverio_tests:
17+
name: WebdriverIO tests (against add-screen-reader-support-experimental core develop)
1818
timeout-minutes: 10
1919
runs-on: ${{ matrix.os }}
2020

@@ -29,11 +29,11 @@ jobs:
2929
with:
3030
path: main
3131

32-
- name: Checkout core Blockly
32+
- name: Checkout experimentation Blockly
3333
uses: actions/checkout@v4
3434
with:
3535
repository: 'google/blockly'
36-
ref: 'develop'
36+
ref: 'add-screen-reader-support-experimental'
3737
path: core-blockly
3838

3939
- name: Use Node.js 20.x
@@ -50,7 +50,7 @@ jobs:
5050
npm install
5151
cd ..
5252
53-
- name: Link latest Blockly develop
53+
- name: Link latest Blockly add-screen-reader-support-experimental
5454
run: |
5555
cd core-blockly
5656
npm run package
@@ -64,30 +64,3 @@ jobs:
6464
run: |
6565
cd main
6666
npm run test
67-
68-
webdriverio_tests:
69-
name: WebdriverIO tests (against pinned v12)
70-
# Don't run pinned version checks for PRs.
71-
if: ${{ !github.base_ref }}
72-
timeout-minutes: 10
73-
runs-on: ${{ matrix.os }}
74-
75-
strategy:
76-
fail-fast: false
77-
matrix:
78-
os: [ubuntu-latest, macos-latest]
79-
80-
steps:
81-
- name: Checkout experimentation plugin
82-
uses: actions/checkout@v4
83-
84-
- name: Use Node.js 20.x
85-
uses: actions/setup-node@v4
86-
with:
87-
node-version: 20.x
88-
89-
- name: NPM install
90-
run: npm install
91-
92-
- name: Run tests
93-
run: npm run test

src/actions/mover.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,9 @@ export class Mover {
245245
this.patchDragger(info.dragger as dragging.Dragger, dragStrategy.moveType);
246246

247247
// Save the position so we can put the cursor in a reasonable spot.
248-
// @ts-expect-error Access to private property connectionCandidate.
249248
const target = dragStrategy.connectionCandidate?.neighbour;
250249

251250
// Prevent the strategy connecting the block so we just delete one block.
252-
// @ts-expect-error Access to private property connectionCandidate.
253251
dragStrategy.connectionCandidate = null;
254252

255253
info.dragger.onDragEnd(

src/keyboard_drag_strategy.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ export class KeyboardDragStrategy extends dragging.BlockDragStrategy {
6969
// to the top left of the workspace.
7070
// @ts-expect-error block and startLoc are private.
7171
this.block.moveDuringDrag(this.startLoc);
72-
// @ts-expect-error connectionCandidate is private.
7372
this.connectionCandidate = this.createInitialCandidate();
7473
this.forceShowPreview();
7574
this.block.addIcon(new MoveIcon(this.block));
@@ -81,9 +80,7 @@ export class KeyboardDragStrategy extends dragging.BlockDragStrategy {
8180
super.drag(newLoc);
8281

8382
// Handle the case when an unconstrained drag found a connection candidate.
84-
// @ts-expect-error connectionCandidate is private.
8583
if (this.connectionCandidate) {
86-
// @ts-expect-error connectionCandidate is private.
8784
const neighbour = (this.connectionCandidate as ConnectionCandidate)
8885
.neighbour;
8986
// The next constrained move will resume the search from the current
@@ -259,7 +256,6 @@ export class KeyboardDragStrategy extends dragging.BlockDragStrategy {
259256
private forceShowPreview() {
260257
// @ts-expect-error connectionPreviewer is private
261258
const previewer = this.connectionPreviewer;
262-
// @ts-expect-error connectionCandidate is private
263259
const candidate = this.connectionCandidate as ConnectionCandidate;
264260
if (!candidate || !previewer) return;
265261
const block = this.block;

test/index.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,34 @@
143143
</select>
144144
</div>
145145
</form>
146+
<div>
147+
<br />
148+
Instructions for screen reader support:
149+
<ul>
150+
<li>
151+
Enable a screen reader while on the page, and tab navigate/use
152+
arrow keys as normal.
153+
</li>
154+
<li>
155+
It's recommended to enable text output (sometimes a developer
156+
feature) so that you can see what the screen reader will read
157+
out (which allows it to be muted, or even just helps to follow
158+
along).
159+
</li>
160+
<li>
161+
It's recommended to use a keyboard shortcut for quickly
162+
enabling/disabling the screen reader to avoid needing to
163+
navigate back through menus to disable it.
164+
</li>
165+
</ul>
166+
For the primary discussion around screen reader support, please read
167+
and comment on: discussion
168+
<a
169+
href="https://github.com/google/blockly-keyboard-experimentation/discussions/673"
170+
target="_blank"
171+
>#673</a
172+
>.
173+
</div>
146174
</div>
147175
</div>
148176
<div id="blocklyDiv"></div>

0 commit comments

Comments
 (0)