-
Notifications
You must be signed in to change notification settings - Fork 1
cell components
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.
some of the most appropriate semantic elements for notebook components are form elements. for this reason, we represent each cell as form
.
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 a
nchor 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.
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.
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.
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.
by default, cell metadata is hidden and inaudible by default.
cell metadata is held in a dialog
.
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.
by default, cell execution counts are shown for executed code cells