Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more alt text descriptions #14320

Closed
wants to merge 36 commits into from
Closed

Add more alt text descriptions #14320

wants to merge 36 commits into from

Conversation

s596757
Copy link

@s596757 s596757 commented Apr 3, 2023

PR-label: Accessibility
Labels: Enhancement
Have added titles and descriptions to headings, icons and images as per ticket request. Have removed descriptions from within svgs and instead added changes to the addtitlestosvgs function to allow titles to be read @krassowski please can you check and approve so we can move forward

References

#9682 and ticket from prioratised task list

Code changes

Added alt description to images and icons

User-facing changes

Icons and images have descriptive labels when you hover over them

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@welcome
Copy link

welcome bot commented Apr 3, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@s596757 s596757 changed the title Ticket #9682: Alt text descriptions added PR-label: enhancement: Alt text descriptions added Apr 3, 2023
@s596757 s596757 changed the title PR-label: enhancement: Alt text descriptions added Alt text descriptions added tag:Accessibility Apr 3, 2023
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @s596757 I have suggestions to support alternative text localization.


@isabela-pf @gabalafou @steff456 would you mind reviewing this one? I'm not sure about the title on the icon and the title. For me, using title feels in proper (in particular for the icon) as it will result in a pop-up display by the browser for people without disabilities.

jupyterlab/staging/templates/Untitled.ipynb Outdated Show resolved Hide resolved
packages/help-extension/src/index.tsx Outdated Show resolved Hide resolved
packages/launcher/src/widget.tsx Outdated Show resolved Hide resolved
s596757 and others added 6 commits April 3, 2023 15:10
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Copy link
Contributor

@steff456 steff456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!

Thanks for adding alt text descriptions! I'm seeing that you want to add this property to icons and I'm wondering if we could add a more detailed description on what happens when the users click them more than just describing the actual icon.

I'm sharing with you this blog post where you can see some examples, https://www.searchenginejournal.com/alt-text-for-logos-and-buttons/469801/#close

Let me know if you need any extra help!

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2023

Benchmark report

The execution time (in milliseconds) are grouped by test file, test type and browser.
For each case, the following values are computed: min <- [1st quartile - median - 3rd quartile] -> max.

The mean relative comparison is computed with 95% confidence.

Results table
Test file large_code_notebook large_md_notebook
open
chromium
actual 526 <- [576 - 600 - 632] -> 727 1075 <- [1211 - 1240 - 1266] -> 1380
expected 499 <- [561 - 590 - 624] -> 986 1116 <- [1206 - 1228 - 1258] -> 1359
Mean relative change 1.9% ± 2.5% 0.5% ± 1.2%
switch-from
chromium
actual 559 <- [655 - 678 - 697] -> 771 301 <- [351 - 379 - 403] -> 501
expected 569 <- [654 - 666 - 685] -> 861 305 <- [352 - 377 - 402] -> 465
Mean relative change 1.2% ± 1.6% 0.4% ± 3.0%
switch-to
chromium
actual 1134 <- [1179 - 1209 - 1236] -> 1386 775 <- [822 - 836 - 852] -> 922
expected 1111 <- [1160 - 1187 - 1236] -> 1383 782 <- [825 - 841 - 858] -> 914
Mean relative change 1.4% ± 1.3% -0.6% ± 0.9%
close
chromium
actual 139 <- [149 - 154 - 162] -> 205 196 <- [206 - 212 - 220] -> 261
expected 137 <- [147 - 152 - 158] -> 183 188 <- [206 - 212 - 218] -> 248
Mean relative change 2.0% ± 1.8% 0.3% ± 1.5%

Changes are computed with expected as reference.

@jupyterlab/benchmarks@1.0.0 test:mocha
mocha ./tests/

Waiting for localhost:8888
localhost:8888 is up

Cell memory leaks

Create a code cell Memory change: +160 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
ArraySearchMarker 1 +5 B
ContentDeleted 1 +16 B
ContentString 1 +69 B
Detached Text 1 +83 B
FocusTracker 1 +276 B
ObservableList 1 +60 B
OutputArea 1 +1.4 kB
OutputAreaModel 1 +115 B
Promise 1 +20 B
PromiseDelegate 1 +128 B
ResizeHandle 1 +47 B
RestorablePool 1 +304 B
UndoManager 1 +1.93 kB
WidgetTracker 1 +980 B
YArray 1 +164 B
YCodeCell 1 +107 B
YText 1 +353 B
Detached DOMStringMap 2 +96 B
Detached V8EventHandlerNonNull 2 +80 B
Set 2 +1.21 kB
YMap 2 +464 B
StackItem 3 +1.32 kB
ContentAny 4 +238 B
ContentType 4 +64 B
DeleteItem 4 +80 B
DeleteSet 6 +988 B
Detached HTMLCollection 6 +568 B
EventHandler 8 +267 B
ID 10 +320 B
Item 10 +1.2 kB
Detached DOMTokenList 13 +876 B
Detached Attr 14 +1.12 kB
Detached HTMLDivElement 14 +47 kB
Map 17 +2.71 kB
Signal 19 +319 B
Array 44 +5.74 kB
Detached V8EventListener 263 +23.4 kB
Detached EventListener 265 +42.6 kB
(closure) 270 +27.7 kB
Detached InternalNode 323 +45.3 kB

Leaking collections:

Type Change Preview Size increased at
Array +2 [StackItem, ...]
UndoManager.afterTransactionHandler  http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:5064:15
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.forEach <anonymous>
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.<anonymous> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4720:27
webpack://jupyterlab/node_modules/lib0/function.js:19:0
cleanupTransactions http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4722:62
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4843:9
Doc.transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:2050:5
Array +10 [Item, ...]
addStruct                    http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4295:11
Item.integrate http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:11118:7
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:6651:22
Array.forEach <anonymous>
typeListInsertGenericsAfter http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:6624:11
typeListInsertGenerics http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:6711:10
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:7039:9
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4829:14
YArray.insert http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:7038:7
Set +1 Set((anonymous function), ...)
                          webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                                                                     
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:2209:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:5084:14
YCodeCell.setUndoManager http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:398:33
<unknown> http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1584:15
Array.forEach <anonymous>
YNotebook.insertCells http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1583:16
YNotebook.insertCell http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1564:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:404:22
Create a markdown cell Memory change: -143 kB Leak detected: No

Leaking objects:

Object # added Retained size increase
ActivityMonitor 1 +294 B
ArraySearchMarker 1 +5 B
AttachmentsModel 1 +193 B
AttachmentsResolver 1 +14 B
CodeCellModel 1 +359 B
ContentString 1 +72 B
Debouncer 1 +3.46 kB
Detached HTMLAnchorElement 1 +324 B
Detached HTMLButtonElement 1 +5.31 kB
Detached HTMLHeadingElement 1 +1.08 kB
Error 1 +3.06 kB
MarkdownCell 1 +4.72 kB
MarkdownCellModel 1 +237 B
Poll 1 +3.7 kB
RenderMimeRegistry 1 +227 B
RenderedMarkdown 1 +65 B
Transaction 1 +860 B
TypeError 1 +295 B
YArray 1 +164 B
YArrayEvent 1 +357 B
YCodeCell 1 +107 B
YMarkdownCell 1 +45 B
Detached CSSStyleDeclaration 2 +116 B
Detached HTMLElement 2 +352 B
Detached V8EventHandlerNonNull 2 +5.04 kB
Promise 2 +3.06 kB
PromiseDelegate 2 +3.27 kB
UndoManager 2 +2.38 kB
YText 2 +479 B
Detached DOMStringMap 3 +128 B
ObservableMap 3 +381 B
StackItem 3 +1.33 kB
DeleteItem 4 +80 B
YMap 4 +872 B
ContentAny 5 +490 B
DeleteSet 6 +1 kB
ContentType 7 +112 B
Detached Text 7 +560 B
Set 8 +1.76 kB
Detached HTMLDivElement 10 +30.6 kB
Detached DOMTokenList 13 +784 B
ID 13 +416 B
Item 13 +1.75 kB
EventHandler 14 +448 B
Detached HTMLCollection 17 +1.75 kB
Map 27 +12.2 kB
Signal 28 +722 B
Detached V8EventListener 130 +10.9 kB
Detached EventListener 132 +25.5 kB
(closure) 152 +-822 B
Detached InternalNode 162 +28.1 kB

Leaking collections:

Type Change Preview Size increased at
Array +1 [b959dcb8-5d3d-4c81-a278-5aabdca5a819, ...]
                                     webpack://jupyterlab/packages/notebook/src/actions.tsx:2503:37            
Array.forEach <anonymous>
webpack://jupyterlab/packages/notebook/src/actions.tsx:2498:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:350:12
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2653:15
CommandRegistry.execute http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:5748:33
CommandRegistry._executeKeyBinding http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:5906:14
CommandRegistry.processKeydownEvent http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:5846:18
JupyterLab.evtKeydown http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:4660:23
Array +1 [{signal, slot, thisArg}, ...]
Object.connect  http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10491:17
Signal.connect http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10231:24
webpack://jupyterlab/packages/notebook/src/notebooktools.ts:226:33
invokeSlot http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10700:18
Object.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10658:17
Signal.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10257:17
webpack://jupyterlab/packages/notebook/src/tracker.ts:90:30
invokeSlot http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10700:18
Object.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10658:17
Array +1 [{signal, slot, thisArg}, ...]
Object.connect  http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10491:17
Signal.connect http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10231:24
webpack://jupyterlab/packages/cell-toolbar/src/celltoolbartracker.ts:121:37
invokeSlot http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10700:18
Object.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10658:17
Signal.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10257:17
webpack://jupyterlab/packages/notebook/src/widget.ts:1328:30
webpack://jupyterlab/packages/notebook/src/actions.tsx:408:28
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2722:15
Array +2 [StackItem, ...]
UndoManager.afterTransactionHandler  http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:5064:15
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.forEach <anonymous>
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.<anonymous> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4720:27
webpack://jupyterlab/node_modules/lib0/function.js:19:0
cleanupTransactions http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4722:62
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4843:9
Doc.transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:2050:5
Array +13 [Item, ...]
addStruct                    http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4295:11
Item.integrate http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:11118:7
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:6651:22
Array.forEach <anonymous>
typeListInsertGenericsAfter http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:6624:11
typeListInsertGenerics http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:6711:10
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:7039:9
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4829:14
YArray.insert http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:7038:7
Set +2 Set((anonymous function), ...)
                          webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                                                                     
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:2209:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:5084:14
YCodeCell.setUndoManager http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:398:33
<unknown> http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1584:15
Array.forEach <anonymous>
YNotebook.insertCells http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1583:16
YNotebook.insertCell http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1564:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:404:22
Create a raw cell Memory change: +143 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
ArraySearchMarker 1 +5 B
CodeCellModel 1 +359 B
ContentString 1 +690 B
Detached CSSStyleDeclaration 1 +64 B
Detached V8EventHandlerNonNull 1 +40 B
ObservableMap 1 +102 B
TypeError 1 +301 B
YArray 1 +164 B
YCodeCell 1 +107 B
YRawCell 1 +45 B
Detached DOMStringMap 2 +92 B
Set 2 +1.26 kB
UndoManager 2 +2.38 kB
YText 2 +454 B
StackItem 3 +1.33 kB
DeleteItem 4 +80 B
YMap 4 +872 B
ContentAny 5 +417 B
Detached HTMLCollection 5 +468 B
DeleteSet 6 +1 kB
ContentType 7 +112 B
Detached DOMTokenList 9 +564 B
Detached HTMLDivElement 9 +22.6 kB
Signal 11 +450 B
ID 13 +416 B
Item 13 +2.3 kB
EventHandler 14 +448 B
Map 19 +2.85 kB
Object 35 +20.7 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 131 +20.4 kB
(closure) 140 +26.1 kB
Detached InternalNode 151 +21.6 kB

Leaking collections:

Type Change Preview Size increased at
Array +1 [{signal, slot, thisArg}, ...]
Object.connect  http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10491:17
Signal.connect http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10231:24
webpack://jupyterlab/packages/cell-toolbar/src/celltoolbartracker.ts:121:37
invokeSlot http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10700:18
Object.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10658:17
Signal.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10257:17
webpack://jupyterlab/packages/notebook/src/widget.ts:1328:30
webpack://jupyterlab/packages/notebook/src/actions.tsx:408:28
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2722:15
Array +1 [{signal, slot, thisArg}, ...]
Object.connect  http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10491:17
Signal.connect http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10231:24
webpack://jupyterlab/packages/notebook/src/notebooktools.ts:226:33
invokeSlot http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10700:18
Object.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10658:17
Signal.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10257:17
webpack://jupyterlab/packages/notebook/src/tracker.ts:90:30
invokeSlot http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10700:18
Object.emit http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:10658:17
Array +1 [5a99bc4c-9b50-469f-985b-dd4c2a87b203, ...]
                                     webpack://jupyterlab/packages/notebook/src/actions.tsx:2503:37            
Array.forEach <anonymous>
webpack://jupyterlab/packages/notebook/src/actions.tsx:2498:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:350:12
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2653:15
CommandRegistry.execute http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:5748:33
CommandRegistry._executeKeyBinding http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:5906:14
CommandRegistry.processKeydownEvent http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:5846:18
JupyterLab.evtKeydown http://localhost:8888/static/lab/jlab_core.912f2b7e2a9f04feb210.js:4660:23
Array +2 [StackItem, ...]
UndoManager.afterTransactionHandler  http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:5064:15
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.forEach <anonymous>
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.<anonymous> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4720:27
webpack://jupyterlab/node_modules/lib0/function.js:19:0
cleanupTransactions http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4722:62
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4843:9
Doc.transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:2050:5
Array +13 [Item, ...]
addStruct                    http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4295:11
Item.integrate http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:11118:7
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:6651:22
Array.forEach <anonymous>
typeListInsertGenericsAfter http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:6624:11
typeListInsertGenerics http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:6711:10
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:7039:9
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:4829:14
YArray.insert http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:7038:7
Set +2 Set((anonymous function), ...)
                          webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                                                                     
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:2209:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.7c22fc794e51ffbd0e42.js:5084:14
YCodeCell.setUndoManager http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:398:33
<unknown> http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1584:15
Array.forEach <anonymous>
YNotebook.insertCells http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1583:16
YNotebook.insertCell http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1564:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:404:22
- Drag and drop a cell

File editor memory leaks

Create a file Memory change: -80.1 kB Leak detected: No

Leaking objects:

Object # added Retained size increase
Detached HTMLUListElement 1 +3.17 kB
Detached V8EventHandlerNonNull 1 +40 B
VirtualElementPass 1 +46 B
Detached HTMLButtonElement 2 +23.8 kB
Detached SVGCircleElement 2 +1.12 kB
HTMLDivElement 2 +249 B
LabIcon 2 +1.09 kB
Detached CSSStyleDeclaration 3 +228 B
Detached HTMLLIElement 3 +6.07 kB
Detached NodeList 3 +204 B
NavigationHistoryEntry 3 +720 B
VirtualText 3 +109 B
Detached SVGGElement 4 +3 kB
VirtualElement 4 +2.1 kB
Detached SVGAnimatedPreserveAspectRatio 5 +320 B
Detached SVGAnimatedRect 5 +320 B
Detached SVGPathElement 5 +1.81 kB
Detached SVGSVGElement 5 +8.14 kB
Detached HTMLSpanElement 6 +2.38 kB
Detached DOMStringMap 7 +420 B
Detached SVGAnimatedNumber 7 +448 B
Detached Attr 10 +800 B
Detached Text 10 +992 B
Detached HTMLCollection 13 +1.42 kB
Detached DOMTokenList 14 +916 B
Detached HTMLDivElement 15 +33.8 kB
Detached SVGAnimatedString 16 +896 B
Detached SVGAnimatedTransformList 16 +1.02 kB
Detached SVGAnimatedLength 26 +1.66 kB
Array 42 +24.7 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 131 +20.4 kB
(closure) 138 +23.1 kB
✔ Opening a text file (65416ms)

Notebook memory leaks

Create a notebook Memory change: +22.9 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
Detached HTMLUListElement 1 +2.28 kB
Detached V8EventHandlerNonNull 1 +40 B
VirtualElementPass 1 +46 B
Detached HTMLButtonElement 2 +23.6 kB
Detached SVGCircleElement 2 +1.12 kB
HTMLDivElement 2 +-950 B
LabIcon 2 +130 B
Detached CSSStyleDeclaration 3 +252 B
Detached HTMLLIElement 3 +6.2 kB
Detached NodeList 3 +240 B
NavigationHistoryEntry 3 +720 B
VirtualText 3 +108 B
VirtualElement 4 +1.1 kB
Detached SVGAnimatedPreserveAspectRatio 5 +320 B
Detached SVGAnimatedRect 5 +320 B
Detached SVGSVGElement 5 +9.46 kB
Detached HTMLSpanElement 6 +3.2 kB
Detached SVGGElement 6 +5.02 kB
Detached SVGPathElement 7 +2.53 kB
Detached SVGAnimatedNumber 9 +576 B
Detached Attr 10 +800 B
Detached Text 10 +784 B
Detached HTMLCollection 13 +1.33 kB
Detached DOMTokenList 15 +1.02 kB
Detached HTMLDivElement 15 +33.7 kB
Detached SVGAnimatedString 20 +1.12 kB
Detached SVGAnimatedTransformList 20 +1.28 kB
DOMRectReadOnly 22 +1.23 kB
Detached SVGAnimatedLength 26 +1.66 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 131 +20.4 kB
(closure) 138 +38.2 kB
✔ Opening a notebook (68107ms)

2 passing (6m)
1 pending
1 failing

   Adding a cell:

  Create a code cell - Objects leaking
  + expected - actual

  -1322
  +1308
  
  at file:///home/runner/work/_actions/jupyterlab/benchmarks/v1/memory-leaks/tests/utils.mjs:43:16
  at Array.forEach (<anonymous>)
  at expectNoLeaks (file:///home/runner/work/_actions/jupyterlab/benchmarks/v1/memory-leaks/tests/utils.mjs:28:11)
  at testScenario (file:///home/runner/work/_actions/jupyterlab/benchmarks/v1/memory-leaks/tests/utils.mjs:230:3)
  at async Context.<anonymous> (file:///home/runner/work/_actions/jupyterlab/benchmarks/v1/memory-leaks/tests/cell.test.mjs:7:5)

Copy link
Contributor

@isabela-pf isabela-pf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for working on adding image labels in JupyterLab! As I mentioned in the accessibility meeting this week, I don't want to block this with my limited time. Please move forward with the other reviewers' comments first. I won't block it if other people are ready to merge.

I'm going to try and address the comments that have come before me.

I'm not sure about the title on the icon and the title. For me, using title feels in proper (in particular for the icon) as it will result in a pop-up display by the browser for people without disabilities.

@fcollonval That doesn't sound ideal, but I don't know how to test it in this case, sorry. Are you talking about how each of the labels, or one in particular. I can try it out if I know which one I'm looking for.

I'd also second @steff456 that it would be helpful to say what the icons do when selected in the description. I would also be happy to include suggestions if I know which icons these are appearing on, but I don't have enough time to dig at the moment.

If it's helpful, I can tell you the main things I look for in image descriptions are summarized in the Jupyter accessibility workshop resources. But not all of JupyterLab follows this yet. Thank you again!

examples/terminal/templates/error.html Outdated Show resolved Hide resolved
jupyterlab/staging/templates/partial.html Outdated Show resolved Hide resolved
packages/help-extension/src/index.tsx Outdated Show resolved Hide resolved
packages/launcher/src/widget.tsx Outdated Show resolved Hide resolved
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some modifications here are not proper - alt tag does not exist in SVG: https://stackoverflow.com/questions/23146570/alt-tag-possible-for-inline-svg. title should be used or aria-labelledby

Moreover we should not set id as a icon may appears multiple time.

Finally setting the title/alternate text and the description in the inline SVG forbid any internationalization.

So I would suggest ensuring we can provide an aria-labelledby attribute and/or title and description when injecting an icon. So those attribute will be passed to the the SVG properly.

If title is provided, we could automatically add an arial-labelledby referencing the title with a dynamically generated id to ensure uniqueness.

@s596757
Copy link
Author

s596757 commented May 15, 2023

@krassowski
@fcollonval

Please can you have a look at the changes we've made

@github-actions
Copy link
Contributor

Galata snapshots updated.

@s596757
Copy link
Author

s596757 commented May 19, 2023

Some modifications here are not proper - alt tag does not exist in SVG: https://stackoverflow.com/questions/23146570/alt-tag-possible-for-inline-svg. title should be used or aria-labelledby

Moreover we should not set id as a icon may appears multiple time.

Finally setting the title/alternate text and the description in the inline SVG forbid any internationalization.

So I would suggest ensuring we can provide an aria-labelledby attribute and/or title and description when injecting an icon. So those attribute will be passed to the the SVG properly.

If title is provided, we could automatically add an arial-labelledby referencing the title with a dynamically generated id to ensure uniqueness.

Changes made, please review thank you

@andrii-i
Copy link
Contributor

Accidentally removed review requests, added back

@s596757
Copy link
Author

s596757 commented Aug 2, 2023

@krassowski @fcollonval Please can you review asap? Thank you :)

Copy link
Contributor

@isabela-pf isabela-pf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello again! I gave this another review and it seems solid based on my knowledge. I don't have further information about the implementation details, so the content of the image descriptions is the only thing I reviewed.

I have provided suggestions to make my feedback as clear as possible, but I'm open to other solutions for the feedback. I'll be happy to give it another approving review if you tag me when this updates. Thank you for your patience.

For general reference of anyone stumbling into my review in the future, I try to check my alt text reviews against the lovely wealth of example descriptions the W3C provides.

@@ -867,6 +867,7 @@ export namespace Dialog {
iconClass="jp-Icon"
className="jp-ToolbarButtonComponent-icon"
tag="span"
title={trans.__('Close Icon, closes toolbar')}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually recommend against words like icon, image, or the like because it is often otherwise declared or not more important than the fact it is an interactive area with an attached action.

Suggested change
title={trans.__('Close Icon, closes toolbar')}
title={trans.__('Close toolbar')}

@@ -386,7 +386,9 @@ const resources: JupyterFrontEndPlugin<void> = {
isEnabled,
execute: () => {
// Create the header of the about dialog
const headerLogo = <img src={kernelIconUrl} />;
const headerLogo = (
<img src={kernelIconUrl} alt={trans.__('Header logo')} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually I have logo alt text describe the name of the thing the logo describes. I think in this case I would be wondering "which logo?" if this were read to me, especially since there are a number of viable options in the Jupyter space. (I am referencing this W3C logo description example.)

I am relatively confident this is always the Project Jupyter logo, but if there are cases where it might be JupyterLab or something else I would have a different suggestion.

Suggested change
<img src={kernelIconUrl} alt={trans.__('Header logo')} />
<img src={kernelIconUrl} alt={trans.__('Project Jupyter')} />

@@ -549,10 +549,6 @@ export class LabIcon implements LabIcon.ILabIcon, VirtualElement.IRenderer {
if (uuid) {
svgElement.dataset.iconId = uuid;
}

if (title) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to go one step further and delete title from the arguments passed into _initSvg

@krassowski
Copy link
Member

Closing as superseded by #15265.

@krassowski krassowski closed this Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants