Repository navigation
fix(platform): name the editor tab by a level-two heading - #4862
Merged
Merged
Conversation
On a wide screen the editor's outline went from the page's title (level 1) straight to the open inspector's title (level 3), whichever box was open: Runs, Versions and General each carry a level-two title and the Editor tab, a workbench, had none. The editor region now takes its name from an sr-only h2 holding the same word, so its accessible name is unchanged and the outline reads title, Editor, the box's title, its sections. A phone's sheet already brings its own level 2. The tests list each inspector's headings in reading order and fail on a level that rises by more than one; AUTO-A16 gains the headings list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On a wide screen the editor's outline went from the page's title (level 1, the breadcrumb) straight to the open inspector's title (level 3), whichever box was open: a node, Start, End or a test. axe's
heading-order(a best practice, not a WCAG A or AA criterion) flagged it on all four, in light, dark and forced colours, in English, German and French. The phone's sheet was already in order: its own title is a level 2.Runs, Versions and General each carry a level-2 title; the Editor tab, a workbench, had none. It does now: an
h2that only a screen reader sees, holding the existingnavigation.editorstring ("Editor"), as the first child of the editor region. The region takes its name from it (aria-labelledbyinstead ofaria-label), so its accessible name is the same word as before. The outline reads: page title, Editor, the open box's title, its sections. Nothing visible changes and there is no new string.I did not shift the inspectors down a level instead (title to level 2, sections to 3, the test setup form's to 3 and 4): that is eight files, the run step detail is shared with the run page under other parents, and the phone's sheet would then carry two level-2 headings in a row.
How it was found, and a correction to #4847
#4847 said the audit found no violations on the test inspector. That held for the phone's sheet only. The desktop inspector's locator in my audit script was
complementary.last(), which is the dashboard's own sidebar, so the inspector itself had never been audited on a wide screen. The script now finds the inspector by its name, skips the visually hidden one-pixel boxes its clipped-text probe used to count, and covers the node, Start and End inspectors too.Re-run on the capture stack: 128 audits over the testing and versioning surfaces (English in light, dark, forced colours and phone; German and French in light, dark, phone and 320 px). The only finding in any of them is this one, on the four wide inspectors. No overflow, no clipped text, no contrast, name or label violations, in any of the three languages; the control page still reports its three planted faults.
Tests
AutomationEditor outlineinautomation-editor.test.tsx, six tests:Five fail on the old code. Demoting the inspector titles to level 4 (a mutation) fails the same four plus the sheet.
Checks
tsc,oxlint --type-awareon both files, format check.heading-order, per surface and mode): node, Start, End, test and failed-test inspectors, light, dark, forced colours, phone, German, French. Before: one violation on every wide combination; after: 30 audits, none.lint:manual(1,764 boxes), knip: all green.Manual:
AUTO-A16(a screen reader on Start, a condition and End) also reads the headings list; the reference row says the unit test owns the structure.