Skip to content

Commit 1478851

Browse files
put more emphesis on the proposal goals & add cursor example
1 parent 7f9f20d commit 1478851

File tree

2 files changed

+69
-20
lines changed

2 files changed

+69
-20
lines changed

_sass/base/media.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,23 @@ picture {
1010
margin: 0;
1111
max-width: 100%;
1212
}
13+
14+
// site design / logo © 2015 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required
15+
// stackexchange.com
16+
kbd {
17+
padding: .1em .6em;
18+
border: 1px solid #ccc;
19+
font-size: 11px;
20+
font-family: Arial,Helvetica,sans-serif;
21+
background-color: #f7f7f7;
22+
color: #333;
23+
-moz-box-shadow: 0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
24+
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
25+
box-shadow: 0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
26+
border-radius: 3px;
27+
display: inline-block;
28+
margin: 0 .1em;
29+
text-shadow: 0 1px 0 #fff;
30+
line-height: 1.4;
31+
white-space: nowrap
32+
}

blog/_posts/2018-06-13-accessible-scala.md

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,71 @@ by: Guillaume Massé
55
title: Introducing Accessible Scala
66
---
77

8-
Have you found yourself where you had to verbally describe code? For example, while pair-programming
9-
or talking about work during lunch. Verbally describing code is not an easy task, fortunately for you the
10-
Scala Center is working on this. [SCP-016]: Accessible Scala, was submitted to provide industry-leading support
11-
for blind and partially-sighted developers. It's also an opportunity to formalize a spoken Scala. For example,
12-
how do you pronounce: `Map[K, V]`? Perhaps `Map of K V`, or maybe `Map taking K and V`.
13-
14-
Reading Scala out loud make some of its syntactic elements less intimidating for beginners. When we read the
15-
following expression: `class S[+T]` as `class S parameterized with covariant T`, we don't need to mentally
16-
associate the syntax `+T` with its concept `co-variant`.
17-
18-
One of the goals of the proposal is to remove the noise introduced by various delimiters. Notice how the type
19-
parameter delimiters: `[` and `]` are absent from the verbal description. However, with more complex expressions,
20-
this can make the audible form ambiguous, for example, with nested types: `Either[Wobble[T], Option[Wobble[S]]]`
21-
becomes: `Either applied to types Wobble of T, Option of Wobble of S`.
22-
8+
Scala is proudly a welcoming environment for all. The Scala Center is demonstrating this by supporting
9+
the development of Accessible Scala, a tool for blind and partially-sighted developers (see [SCP-016]).
10+
One of its goals is to remove the noise introduced by various delimiters. For example, we could read the
11+
following expression: `class S[+T]` as `class S parameterized with covariant T`. Since there is more than one way
12+
to pronounce Scala source code, we are open to the community proposition. You can find an extensive test case
13+
here: [DescribeTest.scala]. If you find that descriptions could be improved, send us a pull request with the
14+
expected form.
15+
16+
Reading Scala out loud make some of its syntactic elements less intimidating for beginners. There is no more
17+
need to mentally associate the syntax `+T` with its concept `co-variant`. Notice on the example above, how the type parameter delimiters: `[` and `]` are absent from the verbal description. It call also help sighted developers to describe Scala orally, for example in the context of pair programming. However, when expressions get more complex, the audible form can become ambiguous or difficult to decypher.
18+
2319
To overcome the limitation of verbal description, we created a technique called the Cursor. The idea is simple:
2420
from your cursor location, you can navigate the abstract syntax tree of the source code. From a node, you can
2521
navigate to the parent node, to the siblings (left or right) or the first child. As you navigate the code,
26-
it's described and selected. We created an online demo (adjust your volume!) to let you try the cursor
22+
it's described verbally and selected. Here is an illustrated example, the arrows (→ exp ←) repesents the highlighted text and <kbd>Alt</kbd> + <kbd>Arrow</kbd> the keyboard shorcut applied to navigate.
23+
24+
```
25+
26+
→ private ← class A { // speaks: "private"
27+
val a = 1
28+
}
29+
```
30+
31+
<kbd>Alt</kbd> + <kbd>Right</kbd>
32+
33+
```
34+
private class → A ← { // speaks: "A"
35+
val a = 1
36+
}
37+
```
38+
39+
<kbd>Alt</kbd> + <kbd>Down</kbd>
40+
41+
```
42+
private class A {
43+
→ val a = 1 ← // speaks: "val a equals 1"
44+
}
45+
```
46+
47+
We created an online demo (adjust your volume!) to let you try the cursor
2748
technique and hear the descriptions.
2849

2950
# Want to try it?
3051

3152
We created an [online demo]. You can try it now! (Tip: It works best on google-chrome! )
3253

33-
We also created a [vscode extension] so you can try on your project. Search for `Accessible Scala` in the
54+
We also created a [vscode extension], so you can try on your project. Search for `Accessible Scala` in the
3455
extension manager
3556

36-
<iframe style="margin: 20px auto; display: block;" width="560" height="315" src="https://www.youtube.com/embed/Up2ytnrsX6s" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
57+
<div style="margin: 20px auto; width: 560px;">
58+
<iframe style="margin: 20px auto; display: block;" width="560" height="315" src="https://www.youtube.com/embed/Y7xz0-KkBOU" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
59+
60+
<i>Hello world demo</i>
61+
62+
<iframe style="margin: 20px auto; display: block;" width="560" height="315" src="https://www.youtube.com/embed/Up2ytnrsX6s" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
63+
64+
<i>Coverage demo</i>
65+
</div>
66+
3767

3868
# What's next?
3969

4070
We hope you are excited as we are by the online demo. We would like to hear your feedback on the verbal
4171
descriptions. We would like to invite the Scala community to improve the quality of the project and join the
42-
effort. You can find an extensive test case here: [DescribeTest.scala]. If you find that descriptions could
43-
be improved, send us a pull request with the expected form. Another area where we would need help
72+
effort. Another area where we would need help
4473
is to create an integration with [Emacspeak]. It's an emacs plugin widely used by blind developers. If you
4574
know emacs lisp well and want to participate, please reach out to us!
4675

0 commit comments

Comments
 (0)