Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

This page is the accessibility test plan for Python Download Package.

After download and install Python 3.9, besides Python language, the package installs two helper tools on the computer:

  1. IDLE, a Python’s Integrated Development and Learning Environment
  2. Python Launcher, an application to run python scripts

Below is test plan for testing accessibility of using Python with these tools.

Test Plan for IDLE

The test plan covers two parts:

  1. Python has a list of reserved keywords. Most keywords are regular words but there are a few that are abnormal. One part of the test plan is to make sure these abnormal keywords are communicated to AT users in an understandable way.
  2. The other part of the test plan is to make sure special characters used in scripts such as punctuations and symbols are are communicated to AT users in an understandable way.

Steps to test reserved keywords "def" and "nonlocal"

1. Launch IDLE, which brings up a command line interface;

  • keyboard alternative: dictate text with natural language (words/phrases, spelling, military alphabet, spell mode/numbers mode, commands), coding by voice application (VoiceCode, Talon, Dragonfly), enter text with on screen keyboard/word prediction and mouse if needed
  • Zoomtext: while and after entering script, check Zoomtext function using mouse and keyboard command
    • provide all the details of visual features used (zoom level, magnification lens/full screen, colour, pointer, cursor, focus)
    • provide all the details of the audio features used (voice options, keyboard, mouse hover)
    • provide any other details of features used (finder, voice assistant, multiple monitors)
  • Screenreader: check accuracy of audio, check navigation options, are additional character files required to be installed to reader
  • Windows/Mac accessibility: Screenreader, built in speech, sticky keys, visual, note any features used

2. Input the line below into the interface while using your AT, then hit enter twice until you see the prompt sign ">>>";

Code Block A
def myfunc1():
  x = "John"
  def myfunc2():
    nonlocal x
    x = "hello"
  myfunc2()
  return x

3. Continue to input the line below into the interface while using your AT, then hit enter twice;

Code Block B
print(myfunc1())

4. IDLE should print out this line:

Code Block C
hello

5. Input the line below into the interface while using your AT, then hit enter;

Code Block D
print(myfunc2())

6. The error below should be output in red:

Code Block E
Traceback (most recent call last):
  File "<pyshell#47>", line 1, in <module>
    print(func1())
NameError: name 'func2' is not defined

This whole process should be communicated to IDLE users via AT.

Repeat steps above by copying and pasting the code into the interface.

Steps to test reserved keywords "elif"

"elif" stands for "else if". This test is to ensure this special word can be communicated to AT users.

1. Launch IDLE, which brings up a command line interface;

2. Input the line below into the interface while using your AT, then hit enter;

Code Block F
hello_world = True

3. Continue to input the line below into the interface while using your AT, then hit enter twice until you see the prompt sign ">>>";

Code Block G
if (hello_world):
  print("hi")
elif (hello_world == "True"):
  print("true")
else:
  print("false")

4. IDLE should print out this line:

Code Block H
hi

This whole process should be communicated to IDLE users via AT.

Repeat steps above by copying and pasting the code into the interface.

Steps to test the communication of special characters

Writing scripts often involve the use of special characters such as ~ ! @ # etc. This test is to ensure these special chars can be entered and communicated to AT users properly.

1. Launch IDLE, which brings up a command line interface;

2. Input the line below into the interface while using your AT, then hit enter;

Code Block I
z="<world> = great!"

3. Continue to input the line below into the interface while using your AT, then hit enter;

Code Block J
removeSpecialChars = z.translate ({ord(c): " " for c in "!@#$%^&*()[]{};:,./<>?\|`~-=_+"})

4. Continue to input the line below into the interface while using your AT, then hit enter;

print(removeSpecialChars)

5. IDLE should print out this line:

Code Block K
 world    great 

This whole process should be communicated to IDLE users via AT such as screen readers or dictators.

Note there are empty spaces in front of and at the end of the output line, which should be communicated too.

Repeat steps above by copying and pasting the code into the interface.

Test plan for Python Launcher

1. Open a text editor;

2. Copy and paste the script below into the editor;

Code Block L
hello_world = True
if (hello_world) :
  print("hi, hello world")
elif (hello_world == "True") :
  print("true, hello world")
else :
  print("false, hello world")

3. Save the script as a file with a file extension ".py", for example in a file name of "test.py";

4. Launch Python Launcher;

5. In Python Launcher file menu, go to File → Open;

6. Select the file you just saved;

7. If Python Launcher asks for permission to run terminal, choose "yes";

8. Python Launcher opens a terminal, runs the script and print the output below in the terminal:

Code Block M
Last login: Fri Mar  5 12:49:38 on ttys001
cd '/Users/cindyli/Development/' && '/usr/local/bin/python3'  '/Users/cindyli/Development/test.py'  && echo Exit status: $? && exit 1

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
cindyli@Cindys-MacBook-Pro-3.local:~$ cd '/Users/cindyli/Development/' && '/usr/local/bin/python3'  '/Users/cindyli/Development/test.py'  && echo Exit status: $? && exit 1
hi, hello world
Exit status: 0
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

This whole process should be communicated to IDLE users via AT.

  • No labels