Skip to content

cell components

Tony Fast edited this page Feb 1, 2024 · 8 revisions

notebook cells are composite objects that have multiple properties and constraints. this document highlights resting state for each of the common cell components and comments on their accessibility.

a unique perspective of nbconvert-a11y is that every every cell is treated as a cell, and the cell type determines the visual, audible, and tactile features of the cell object.

cell form

some of the most appropriate semantic elements for notebook components are form elements. for this reason, we represent each cell as form.

cell number

by default, the cell number is shown as a label for the entire cell.

the cell number is the ordinal number in the sequence of cells. users will NOT change this value manually therefore it is NOT a form element. the best semantics for a the cell number are either an anchor tag or a label.

the need for cell number begins with their role as critical landmarks in the discussion of notebook content. the original notebook representations only provided implicit visual navigation for cell number. assistive technology users should be exposed to the cell number, and when we make they number audible we'll need to provide an explicit cell number. further, the cell number helps avoid duplicate aria labels that would fail audits.

cell type

by default, the cell type component is hidden, but the cell type is visually apparent and audibly announced.

the cell type is an enumerated choice defined by the notebook format schema. jupyter notebooks have markdown, code, and raw cells.

a form component that allows users to select one option out of many is the best choice for the cell type. select are a good choice for this component.

cell source

by default, cell source visible and audible for code cells.

the cell source is a multineline string which means that the textarea element is a natural form element to choose.

rendered markdown

markdown cells do NOT show the cell source rather they present an html rendering of the input. this input is non-interactive content that is part of the narrative.

cell metadata

by default, cell metadata is hidden and inaudible by default.

cell metadata is held in a dialog.

cell outputs

by default, cell outputs are shown for code cells containing more than one or more outputs and the number of outputs is always verbally announced.

cell execution count

by default, cell execution counts are shown for executed code cells

cell attachments

Clone this wiki locally