Skip to content

Commit 9f00f48

Browse files
authored
MAINT - Pre-release cleanup (#37)
* 🔧 Update pyproject file * 🙈 Update gitignore * 🔧 Update pyproject meta * 🔧 Update flake8/ruff rules
1 parent 3844ceb commit 9f00f48

File tree

5 files changed

+88
-60
lines changed

5 files changed

+88
-60
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,5 @@ reports/
134134
# editor
135135
.vscode
136136

137+
# Ruff cache
137138
.ruff_cache

pyproject.toml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,36 @@ build-backend = "hatchling.build"
88
[project]
99
name = "jupyter-a11y-tests"
1010
description = "Set of automated accessibility tests for JupyterLab"
11+
version = "1.0.0"
1112
readme = "README.md"
1213
license = "BSD-3-Clause"
13-
authors = [{ name = "Tania Allard", email = "[email protected]" }]
14-
keywords = ["jupyter", "jupyterlab", "accessibility", "a11y"]
14+
requires-python = ">=3.8"
15+
authors = [
16+
{ name = "Tania Allard", email = "[email protected]" },
17+
{ name = "Gabriel Fouasnon", email = "[email protected]" }
18+
]
19+
keywords = ["jupyter", "jupyterlab", "accessibility", "a11y", "testing"]
1520
classifiers = [
16-
"Development Status :: 2 - Pre-Alpha",
21+
"Development Status :: 3 - Alpha",
1722
"Topic :: Software Development :: Build Tools",
23+
"Topic :: Software Development :: Testing",
1824
"Programming Language :: Python :: 3",
1925
"Programming Language :: Python :: 3.8",
2026
"Programming Language :: Python :: 3.9",
2127
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"License :: OSI Approved :: BSD License",
2230
"Intended Audience :: Developers",
2331
"Intended Audience :: Information Technology",
2432
"Intended Audience :: Science/Research",
2533
"Framework :: Jupyter :: JupyterLab",
34+
"Framework :: Jupyter :: JupyterLab :: 3",
35+
"Framework :: Jupyter :: JupyterLab :: 4"
2636
]
27-
requires-python = ">=3.8"
28-
version = "0.0.1"
37+
38+
[project.urls]
39+
Repository = "https://github.com/Quansight-Labs/jupyter-a11y-testing"
40+
Issues = "https://github.com/Quansight-Labs/jupyter-a11y-testing/issues"
2941

3042
[tool.isort]
3143
profile = "black"
@@ -39,11 +51,19 @@ addopts = "--nbval --sanitize-with docs/sanitize.cfg -pno:warnings --cov=schemin
3951
[tool.hatch]
4052

4153
[tool.ruff]
42-
# Never enforce `E501` (line length violations).
4354
builtins = ["c"]
44-
ignore = ["C", "D400", "E", "F401", "F841", "W", "E501"]
55+
# E501 Line too long (158 > 100 characters)
56+
# D400: First line should end with a period
57+
# F401: Imported but unused
58+
# F841: Local variable is assigned to but never used
59+
ignore = ["D400", "F401", "F841", "E501"]
4560
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
46-
select = ["C4", "C9", "D", "E", "F", "W"]
61+
# A: builtins
62+
# F: Pyflakes
63+
# E,W: pycodestyle
64+
# C4: flake8-comprehensions
65+
# D: pydocstyle
66+
select = ["A", "B", "C", "C4", "C9", "D", "E", "F", "W", "ICN"]
4767

4868
[tool.ruff.pydocstyle]
49-
convention = "google" # Accepts: "google", "numpy", or "pep257".
69+
convention = "google"

testing/jupyterlab/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@jupyterlab/a11ytests",
33
"version": "0.0.1",
44
"private": true,
5-
"description": "Run automated accessibility checks against JupyterLab",
5+
"description": "Set of automated accessibility tests for JupyterLab",
66
"license": "BSD-3-Clause",
77
"author": "Project Jupyter",
88
"scripts": {
Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# JupyterLab Testing Scripts
22

3-
This is a series of [testing scripts](https://en.wikipedia.org/wiki/Test_script). designed to mimic common manual accessibility tests in an automated testing setting for JupyterLab. They currently reference [WCAG 2.1](https://www.w3.org/TR/WCAG21/), but ideally will be updated for future versions of WCAG or to align with [ACT-rules](https://act-rules.github.io/rules/).
3+
This is a series of [testing scripts](https://en.wikipedia.org/wiki/Test_script).
4+
Designed to mimic common manual accessibility tests in an automated testing setting for JupyterLab.
5+
They currently reference [WCAG 2.1](https://www.w3.org/TR/WCAG21/), but ideally will be updated for future versions of WCAG or to align with [ACT-rules](https://act-rules.github.io/rules/).
46

57
Those unfamiliar with manual testing techniques may also find these scripts helpful in understanding what to do and observe in a manual testing setting as well.
68

7-
Different scripts apply to different levels of JupyterLab (ie. the whole application versus a single extension). The ideal implementation of these tests is noted in their `Proposed JupyterLab success criteria` section.
9+
Different scripts apply to different levels of JupyterLab (i.e. the whole application versus a single extension).
10+
The ideal implementation of these tests is noted in their `Proposed JupyterLab success criteria` section.
811

912
If you are writing a testing script, please review the [Testing Script Template](testing-script-template.md) for more information.
1013

@@ -20,17 +23,17 @@ This can be tested on the whole JupyterLab application.
2023

2124
#### Proposed testing script
2225

23-
| Step | Expected Behavior |
24-
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25-
| 1. Open default JupyterLab. | JupyterLab opens with unmodified workspace. |
26-
| 2. Set viewport orientation to portrait (And/or mobile viewport?). | JupyterLab accepts the orientation change and doesn't error out. |
27-
| 3. Check menu bar is in expected location. | Menu bar is at the top of the page and have all menu items visible (currently it has a scroll bar). |
28-
| 4. Check left side bar is in expected location. | Left side bar is the leftmost part of the viewport . It stretches from the menu bar to status bar. All icons are visible. |
29-
| 5. Check document area is in expected location. | Document area is the center and majority of the viewport. |
30-
| 6. Check document area toolbar is in expected location. | The document area toolbar is at the top of the document area. All items are visible (currently it has a scroll bar). |
31-
| 7. Check right side bar is in expected location. | Right side bar is the rightmost part of the viewport. It stretches from the menu bar to status bar. All icons are visible. (Right now, I believe this side bar is not able to be accessed in this mode.) |
32-
| 8. Check status bar is in expected location. | The status bar is at the bottom of the page. All information is visible. |
33-
| 9. Success if all main regions are in expected location. | |
26+
| Step | Expected Behavior |
27+
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
28+
| 1. Open default JupyterLab. | JupyterLab opens with unmodified workspace. |
29+
| 2. Set viewport orientation to portrait (And/or mobile viewport?). | JupyterLab accepts the orientation change and doesn't error out. |
30+
| 3. Check menu bar is in expected location. | Menu bar is at the top of the page and have all menu items visible (currently it has a scroll bar). |
31+
| 4. Check left sidebar is in expected location. | Left sidebar is the leftmost part of the viewport . It stretches from the menu bar to status bar. All icons are visible. |
32+
| 5. Check document area is in expected location. | Document area is the center and majority of the viewport. |
33+
| 6. Check document area toolbar is in expected location. | The document area toolbar is at the top of the document area. All items are visible (currently it has a scroll bar). |
34+
| 7. Check right sidebar is in expected location. | Right sidebar is the rightmost part of the viewport. It stretches from the menu bar to status bar. All icons are visible. (Right now, I believe this sidebar is not able to be accessed in this mode.) |
35+
| 8. Check status bar is in expected location. | The status bar is at the bottom of the page. All information is visible. |
36+
| 9. Success if all main regions are in expected location. | |
3437

3538
### [2.1.2 No keyboard trap](https://www.w3.org/WAI/WCAG21/quickref/#no-keyboard-trap)
3639

@@ -42,15 +45,15 @@ This can be tested on multiple regions of JupyterLab. For example, this script w
4245

4346
#### Proposed testing script
4447

45-
| Step | Expected Behavior |
46-
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
47-
| 1. Open default JupyterLab. | JupyterLab opens with unmodified workspace. |
48-
| 2. Start focus at top of tree. | Focus goes to JupyterLab tab, may hit skip link. |
49-
| 3. Tab into menu bar. | Focus goes to menu bar (whole). |
50-
| 4. Open file menu. | Focus goes to File menu (within menu bar). Menu bar opens full list of menu items. |
51-
| 5. Close file menu. | Focus stays on File menu, but menu bar is closed. |
52-
| 6. Tab out of menu bar. | Focus moves from File menu, to other menu items until it leaves the region. Focus will move the left side bar/file browser. |
53-
| 7. Success if focus switches to side bar/file browser. | |
48+
| Step | Expected Behavior |
49+
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
50+
| 1. Open default JupyterLab. | JupyterLab opens with unmodified workspace. |
51+
| 2. Start focus at top of tree. | Focus goes to JupyterLab tab, may hit skip link. |
52+
| 3. Tab into menu bar. | Focus goes to menu bar (whole). |
53+
| 4. Open file menu. | Focus goes to File menu (within menu bar). Menu bar opens full list of menu items. |
54+
| 5. Close file menu. | Focus stays on File menu, but menu bar is closed. |
55+
| 6. Tab out of menu bar. | Focus moves from File menu, to other menu items until it leaves the region. Focus will move the left sidebar/file browser. |
56+
| 7. Success if focus switches to sidebar/file browser. | |
5457

5558
### [2.4.3 Focus Order](https://www.w3.org/WAI/WCAG21/quickref/#focus-order)
5659

@@ -60,33 +63,34 @@ In JupyterLab, areas can be focused in the following order:
6063

6164
1. Skip link
6265
2. Menu bar
63-
3. Left side bar
64-
4. Inside left side bar (selected section)
66+
3. Left sidebar
67+
4. Inside left sidebar (selected section)
6568
5. Top of document area (document toolbar first if it has one)
6669
6. Document (if there is no toolbar for the document type, users go immediately into the document)
67-
7. Right side bar
68-
8. Inside right side bar (selected section)
70+
7. Right sidebar
71+
8. Inside right sidebar (selected section)
6972
9. Status bar
7073

7174
This can be tested on the whole JupyterLab application.
7275

7376
#### Proposed testing script
7477

75-
| Step | Expected Behavior |
76-
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
77-
| 1. Open default JupyterLab. | JupyterLab opens with unmodified workspace. |
78-
| 2. Tab to focus menu bar. | Tab until focus is on the menu bar. (Will this run into the skip link?) |
79-
| 3. Tab through major regions as needed (see above section). | Tab to move focus through left side bar, inside left side bar, top of document area, document area, right side bar, and inside right side bar. |
80-
| 4. Tab to focus status bar | Focus moves to status bar. |
81-
| 5. Success if tab brings focus to status bar. | |
78+
| Step | Expected Behavior |
79+
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
80+
| 1. Open default JupyterLab. | JupyterLab opens with unmodified workspace. |
81+
| 2. Tab to focus menu bar. | Tab until focus is on the menu bar. (Will this run into the skip link?) |
82+
| 3. Tab through major regions as needed (see above section). | Tab to move focus through left sidebar, inside left sidebar, top of document area, document area, right sidebar, and inside right sidebar. |
83+
| 4. Tab to focus status bar | Focus moves to status bar. |
84+
| 5. Success if tab brings focus to status bar. | |
8285

8386
### [2.5.6 Concurrent input mechanisms](https://www.w3.org/WAI/WCAG21/quickref/#concurrent-input-mechanisms)
8487

8588
#### Proposed JupyterLab success criteria
8689

8790
In JupyterLab, a single task can be completed using mouse, keyboard, and touch screen inputs. This works even when completing a single, continuous task.
8891

89-
This can be tested on multiple regions of JupyterLab. For example, this script will test that JupyterLab can open a new notebook from the launcher with mouse, keyboard, and touch screen inputs.
92+
This can be tested on multiple regions of JupyterLab. For example, this script will test that JupyterLab can open a new notebook from the launcher with mouse,
93+
keyboard, and touch screen inputs.
9094

9195
#### Proposed testing script
9296

@@ -95,5 +99,5 @@ This can be tested on multiple regions of JupyterLab. For example, this script w
9599
| 1. Open default JupyterLab | JupyterLab opens with unmodified workspace. |
96100
| 2. Open the file menu with a mouse click. | File menu opens and full list of menu items appears. |
97101
| 3. Navigate to menu item New Launcher with arrow keys. | Focus moves through the File menu list items until it reaches the New Launcher item. |
98-
| 4. Use touch screen input to create new Notebook from Launcher. | The New Notebook from Launcher is selected and the command is initiated. |
102+
| 4. Use touch screen input to create new Notebook from Launcher. | The New Notebook from Launcher is selected, and the command is initiated. |
99103
| 5. Success if new notebook opens. | |

0 commit comments

Comments
 (0)