SPB Git

Repository Public

accessibility.md 7.9 KB 122 lines markdown

1# Accessibility23Scope: the shared UI layer (`Packages/SheetUI`) and the app target. Feature panels are not covered here.45## What is supported67**Labels and state.** Every control of the workbook window has a localized accessibility label;8icon-only buttons (`ToolButton`, colour menus, inspector tabs, close buttons) use their tooltip text.9Stateful buttons report « Activé / Désactivé » as their value and the selected trait. Colour swatches10are named (« Rouge clair »), not shown as hex codes; a sheet tab reports its position (« Feuille 211sur 5 ») and its tab colour by name. Decorative icons are hidden. Status messages, entry errors and12« Aucun résultat » are posted as announcements (`ORIXAccessibility.announce`).1314**The grid** (`GridView+Accessibility.swift`) is one custom-drawn view exposed as a table:1516- label: sheet name + « grille de la feuille »; help: the basic keys;17- value: one sentence about the active cell: reference, column header, displayed value, formula,18  note, link, then the selected range with its size (or the list of ranges);19- children: the visible non-empty cells plus the active cell, at most 600 per screen20  (`GridView.maxAccessibilityChildren`), as `AXCell` elements with label « B3, colonne Revenue »,21  value, frame, row/column index, selected and focused state;22- header detection for that label: header row of the table containing the cell, else the last frozen23  row, else the first (or second) row of the used range when it is text above non-text;24- actions: press on a cell selects it and starts editing; press on the grid edits the active cell;25  show-menu opens the context menu; setting focus or selection on a cell element moves the selection;26- notifications: selected cells / selected children / value changed and focused-element changed (to27  the active cell element) when the selection moves; value changed when contents change; layout and28  title changed when the sheet changes.2930**Keyboard.** Everything in the menu bar has a command; sheet tabs are focusable (Space shows the31sheet, Return renames the active one) and have menu commands: Next/Previous Sheet (⌥⌘→ / ⌥⌘←) and32the new Format ▸ Sheet ▸ Rename… (⌥⌘R). Toolbar menus and buttons are standard controls reachable33with Full Keyboard Access. The function browser offers « Insérer la fonction » as an accessibility34action and in the context menu.3536**Display options** (System Settings ▸ Accessibility ▸ Display):3738- Reduce Motion: the find bar appears without its slide (`ORIX.Motion.respecting`, `isReduced`). It39  is the only animation in SheetUI.40- Increase Contrast: `GridPalette.resolve(dark:increaseContrast:)` gives darker gridlines, header41  separators, header text, frozen-pane line, a stronger selection fill and a thicker selection42  border; selected tool buttons get an outline. The grid redraws when the option changes.43- Differentiate Without Colour: selected tool buttons and inspector tabs gain an outline and a44  heavier glyph. Other states already had a non-colour cue (check mark, bold active tab, icon shapes45  in the compatibility report, text for Edit/Point mode).4647**Text size.** Settings ▸ Accessibility ▸ default zoom of the grid (75–200 %, step 5), applied to new48windows; ⌘+ / ⌘− / ⌘0 and the status-bar menu change it per window. Chrome text uses fixed point49sizes and does not follow a system text-size setting.5051## Colour contrast (WCAG 2.1)5253Measured by `ContrastTests` in `Packages/SheetUI/Tests` (prints the full table for both appearances;54fails under 4.5:1 for text, 3:1 for glyphs and structural lines). Tokens changed in `Design/Tokens.swift`:5556| Pair | Before | After |57|---|---|---|58| textTertiary on surface / canvas / raised, light (`#7A8098` → `#62697F`) | 3.91 / 3.59 / 3.44 | 5.46 / 5.01 / 4.79 |59| textTertiary on raised, dark (`#7F86A0` → `#8A91AB`) | 4.36 | 5.04 |60| accent used as text, light (`#0891B2` → new `accentText` `#0A6F8C`) | 3.68 / 3.38 / 3.23 | 5.73 / 5.26 / 5.03 |61| white label on prominent button, light (`accent` → new `accentFill` `#0A6F8C`) | 3.68 | 5.73 |62| white label on prominent button, dark (`#22D3EE` → `accentFill` `#0E7490`) | 1.81 | 5.36 |63| danger as text, light (`#D4313F` → `#C62633`) | 4.87 / 4.47 / 4.28 | 5.64 / 5.18 / 4.95 |64| warning as text, light (`#B86A00` → `#995700`) | 4.12 / 3.78 / 3.62 | 5.65 / 5.19 / 4.96 |65| success as text, light (`#12925A` → `#0D7A4B`) | 3.97 / 3.65 / 3.49 | 5.38 / 4.94 / 4.73 |66| frozen-pane line on grid, light (`#A9B0C4` → `#858CA3`) | 2.17 | 3.35 |67| frozen-pane line on grid, dark (`#4A5273` → `#626B8F`) | 2.42 | 3.54 |6869Unchanged and passing: primary text 16–18.6:1, secondary text 5.5–8.4:1, grid text 18.6 / 16.1,70header text 5.82 / 6.73, selected header 4.91 / 7.82, grid error text 4.87 / 6.71, the cyan accent as71glyph or selection border 3.2–3.7 (light) and 8.7–10.7 (dark). The cyan accent itself (`#0891B2` /72`#22D3EE`) is kept for fills, glyphs and selection.7374Below 3:1 on purpose: ordinary gridlines (1.24 light, 1.30 dark) and hairlines are decoration;75with Increase Contrast gridlines reach 3.14:1 (light).7677Not measured: colours inside feature panels, and any place where a feature uses `accent` as a text78colour or as a button tint under white text (it should use `accentText` / `accentFill`).7980## What was verified, and how8182Automatically (`swift test` in `Packages/SheetUI`, 20 tests):8384- the accessibility tree of a real `WorkbookView` in an offscreen window, read through the system85  accessibility API (the same interface VoiceOver uses), with the format and the function inspector:86  124 and 183 elements; 62 and 68 controls (buttons, menu buttons, pop-ups, check boxes, text87  fields, disclosure triangles, stepper), **0 without a label**. 9 and 7 system parts (scroller88  pages, stepper arrows, title-bar buttons) are excluded because the system describes them;89- the find bar's fields, buttons and four check boxes are labelled;90- grid: header-context labels, the value sentence with formula and range, 12 cell children for a91  12-cell sheet, the bound on children with thousands of visible cells, press starts editing, focus92  moves the selection, an empty active cell stays reachable;93- component labels and On/Off values, the `localized:` variants, undo names through the catalog;94- contrast of every pair listed above, in light and dark.9596These tree tests need the process that runs them to be allowed under Privacy & Security ▸97Accessibility; they are disabled (not failed) otherwise.9899By eye, on screenshots in French and English (`/tmp/orix-l10n-shots/`): main window light and dark,100function browser, find bar, a 760 × 480 window, Settings, Help, Page Setup.101102**Not verified:**103104- **VoiceOver has not been listened to.** Nobody has navigated the app with VoiceOver, so what is105  actually spoken, the reading order, whether the focus follows the active cell while arrowing and106  whether the announcements are heard are unconfirmed. The notifications are posted; their effect is not tested.107- Apple's `performAccessibilityAudit()` was not run (there is no UI-test target).108- Increase Contrast, Differentiate Without Colour and Reduce Motion were not switched on during a109  run; the code paths are covered by unit tests of the palette only.110- Full Keyboard Access, Voice Control and Switch Control were not exercised.111- Settings, Page Setup, Help and the compatibility report were not put through the tree audit (the112  test harness lives in the SheetUI package); their labels were added by reading the code.113114## Known gaps115116- Sheet-tab actions other than show and rename (duplicate, move, colour, hide, delete) are only in117  the tab's context menu; Duplicate and Delete also exist in Format ▸ Sheet.118- Column and row headers, embedded objects (charts) and the fill handle are not accessibility119  elements; rows and columns are selected with ⇧Space / ⌃Space, resized from the inspector.120- A cell's header context is a heuristic and can be wrong for sheets with several tables.121- Function summaries and formula error messages are announced in English.122
Files main
Menu

Theme