Skip to content

Commit c8cd7ca

Browse files
committed
Revert "feat: Introduce initial screen reader support (experimental) (#684)"
This reverts commit 458e4f8.
1 parent c38f0b6 commit c8cd7ca

File tree

5 files changed

+63
-38
lines changed

5 files changed

+63
-38
lines changed

.github/workflows/build.yml

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

1111
permissions:
1212
contents: read
1313

1414
jobs:
1515
build_tip_of_tree_v12:
16-
name: Build test (against add-screen-reader-support-experimental core develop)
16+
name: Build test (against tip-of-tree 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: 'add-screen-reader-support-experimental'
28+
ref: 'develop'
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 add-screen-reader-support-experimental
45+
- name: Link latest Blockly develop
4646
run: |
4747
cd core-blockly
4848
npm run package
@@ -57,6 +57,26 @@ 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+
6080
lint:
6181
name: Eslint check
6282
timeout-minutes: 5

.github/workflows/test.yml

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

1212
permissions:
1313
contents: read
1414

1515
jobs:
16-
webdriverio_tests:
17-
name: WebdriverIO tests (against add-screen-reader-support-experimental core develop)
16+
webdriverio_tests_tip_of_tree_v12:
17+
name: WebdriverIO tests (against tip-of-tree 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 experimentation Blockly
32+
- name: Checkout core Blockly
3333
uses: actions/checkout@v4
3434
with:
3535
repository: 'google/blockly'
36-
ref: 'add-screen-reader-support-experimental'
36+
ref: 'develop'
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 add-screen-reader-support-experimental
53+
- name: Link latest Blockly develop
5454
run: |
5555
cd core-blockly
5656
npm run package
@@ -64,3 +64,30 @@ 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,11 @@ export class Mover {
244244
this.patchDragger(info.dragger as dragging.Dragger, dragStrategy.moveType);
245245

246246
// Save the position so we can put the cursor in a reasonable spot.
247+
// @ts-expect-error Access to private property connectionCandidate.
247248
const target = dragStrategy.connectionCandidate?.neighbour;
248249

249250
// Prevent the strategy connecting the block so we just delete one block.
251+
// @ts-expect-error Access to private property connectionCandidate.
250252
dragStrategy.connectionCandidate = null;
251253

252254
info.dragger.onDragEnd(

src/keyboard_drag_strategy.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export class KeyboardDragStrategy extends dragging.BlockDragStrategy {
5050
// to the top left of the workspace.
5151
// @ts-expect-error block and startLoc are private.
5252
this.block.moveDuringDrag(this.startLoc);
53+
// @ts-expect-error connectionCandidate is private.
5354
this.connectionCandidate = this.createInitialCandidate();
5455
this.forceShowPreview();
5556
this.block.addIcon(new MoveIcon(this.block));
@@ -61,7 +62,9 @@ export class KeyboardDragStrategy extends dragging.BlockDragStrategy {
6162
super.drag(newLoc);
6263

6364
// Handle the case when an unconstrained drag found a connection candidate.
65+
// @ts-expect-error connectionCandidate is private.
6466
if (this.connectionCandidate) {
67+
// @ts-expect-error connectionCandidate is private.
6568
const neighbour = (this.connectionCandidate as ConnectionCandidate)
6669
.neighbour;
6770
// The next constrained move will resume the search from the current
@@ -250,6 +253,7 @@ export class KeyboardDragStrategy extends dragging.BlockDragStrategy {
250253
private forceShowPreview() {
251254
// @ts-expect-error connectionPreviewer is private
252255
const previewer = this.connectionPreviewer;
256+
// @ts-expect-error connectionCandidate is private
253257
const candidate = this.connectionCandidate as ConnectionCandidate;
254258
if (!candidate || !previewer) return;
255259
const block = this.block;

test/index.html

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

0 commit comments

Comments
 (0)