[BlindRUG] Are some naming convention more screen-reader friendly than others?

David Andrews dandrews at visi.com
Thu May 11 01:33:35 UTC 2017


I am not an R user, but a screen reader user. One configurable 
parameter, with any screen reading program is the amount of 
punctuation to be spoken.  By default most screen readers say some, 
but not all punctuation marks. It can be turned up, but can be 
overwhelming for some data.

My feeling is the style separated by periods will be properly spoken 
by the most software -- but I could be wrong.

Dave

At 01:54 PM 5/10/2017, you wrote:
>Hi.
>
>as a non-screen reader user, I've got a question about coding style
>and naming conventions for users of screen readers (possibly also
>Braille readers).
>
>In R there a few different naming conventions are used.  The classical
>one uses lower-case letters with words separated by periods, e.g.
>read.table().  Closely related to this one is the snake-case style,
>where lower-case words are separated by underscores, e.g.
>file_path_as_absolute().  BTW, the snake-case style was not possible
>to do in R a decade ago, because underscore was a reserved symbol and
>was not allowed in variable and function names.  This was a legacy
>from S and may explain why the period was used so frequently.
>A third common style in R is the camel-case style where the individual
>words are identified by capitalizing the first letter (except for the
>first word), and without a separator, e.g. readLines().
>
>For legacy reasons, I'm a long-term follower of the camel-case style,
>but I've been considering moving to the snake-case style for many
>years now.  Knowing where one is better than the other for
>screen-reader users may help me in this decision.  Maybe it's less
>about one style versus another, but rather a matter of just using a
>consistent style throughout, or?
>
>My first question is, for R developers and R end users that rely on
>screen readers, is there a preference to any of the above styles?  I
>can imagine that a screen reader could have problems with camel-case
>names when reading code, e.g. it tries to read them out as one long
>unknown garbled word, or as an initialism, rather than separate words.
>For instance, does screen reader help distinguish between the
>following three cases:
>
>   1. my.awesome.function()
>
>   2. my_awesome_function()
>
>   3. myAwesomeFunction()
>
>Second, at the R prompt, is one style easier to use than the others?
>Does it matter when using screen readers, or is the issue the same as
>I, as a sighted user, have when I don't know the convention and I end
>up using trial and error with some help from TAB completions?
>
>Finally, does the naming style matter when programming in an editor?
>
>Thanks,
>
>Henrik





More information about the BlindRUG mailing list