Skip to content

Commit 6474449

Browse files
authored
docs(openspec): amend migrate-content tasks 4.3 and 4.9 to native semantics (#1331)
MdDisclosure is a native details element, so its test asserts the open attribute instead of aria-expanded. The EntryList rows are selection buttons marked aria-current="true", not links. Tasks, design and spec now say so. Nothing is ticked: DetailedListEntry does not yet assert its link rows and 4.9 still depends on 4.8. Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
1 parent 85f4bf7 commit 6474449

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎openspec/changes/migrate-content-to-components/design.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Tests select by `data-test` or by the anchor name, never by a utility class. New
236236
- `MdDataTable.sort.test.js`: the pure `sortRows` function, with plain arrays, both directions and a stable order for equal keys.
237237
- `MdDataTable.test.js`: `aria-sort` on the sorted header only, the button inside the header, and the hidden class per priority.
238238
- `MdListItem.test.js` and `MdList.test.js`: `aria-current` on the selected row only, one selected key for the list.
239-
- `MdDisclosure.test.js`: `aria-expanded` toggles, the content is hidden while collapsed, and the control keeps focus.
239+
- `MdDisclosure.test.js`: the native `<details>` `open` attribute toggles (no `aria-expanded`), the content is hidden while collapsed, and the summary keeps focus.
240240
- `MdCard.test.js` (extended): `padding="none"` removes the padding.
241241
- `useFieldBinding.test.js`: the mapping from JSON Forms props to primitive props, with plain input.
242242
- `breakpoints.test.js`: the theme names and the `initial` reset, read from `style.css` source.

‎openspec/changes/migrate-content-to-components/specs/dashboard-content-components/spec.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ list of the dashboard.
103103
- **WHEN** the page of a link row is open
104104
- **THEN** the link row is drawn by `MdListItem` as a link and carries `aria-current="page"`
105105

106+
#### Scenario: Selection row in the settings entry list
107+
108+
- **WHEN** an entry of the settings entry list is selected
109+
- **THEN** its row is drawn by `MdListItem` with a selection button (not a link) and carries `aria-current="true"`
110+
106111
### Requirement: Key and value pairs and status labels use one component each
107112

108113
A list of label and value pairs SHALL be drawn by `MdKeyValueList`, and a status label SHALL be drawn by `MdBadge`. A view SHALL NOT

‎openspec/changes/migrate-content-to-components/tasks.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ of each wave. No file under `reposilite-backend/` and no file under `openspec/`
6969
- [ ] 4.2 `test(ui)`: in `src/components/access/PrincipalsPanel.test.js` and `TeamsPanel.test.js`, assert that exactly one row is selected
7070
for the route, and that the selection is computed once (a spy on the selection function counts one call per render). Verify: it fails
7171
on the four copies.
72-
- [ ] 4.3 `test(ui)`: in `DetailedListEntry.test.js` and `EntryList.test.js`, assert that each link row is an `MdListItem` drawn as a link
73-
(stretched link) with `aria-current="page"` when its route is open. Verify: it fails.
72+
- [ ] 4.3 `test(ui)`: in `DetailedListEntry.test.js`, assert that each link row is an `MdListItem` drawn as a link
73+
(stretched link) with `aria-current="page"` when its route is open; in `EntryList.test.js`, assert that each row is an `MdListItem`
74+
whose stretched control is a selection button (not a link) with `aria-current="true"` on the selected entry only. Verify: it fails.
7475
- [x] 4.4 `fix(ui)`: set `aria-current` and the 56 and 48 pixel row heights on the catalogue's `MdListItem`, and draw the divider
7576
of `MdList` with `divide-y`. Verify: 4.1 passes.
7677
- [x] 4.5 `fix(ui)`: migrate selectable rows (TeamsPanel, PrincipalsPanel, EntryList, AddMemberDialog) to `MdList` and `MdListItem`,
@@ -88,8 +89,8 @@ of each wave. No file under `reposilite-backend/` and no file under `openspec/`
8889
(SsoProvidersPanel, NodeInheritedSection, InstanceStatusPanel, SearchResultRow, RepositoryOverview, SettingsReviewSheet, TypeBadge) to
8990
`MdBadge`; `TokenTag` and `RepositoryTypeBadge` wrap `MdBadge` and keep their anchors, unless the catalogue change already did so
9091
(its task 3.16). Verify: the tests of each file pass.
91-
- [ ] 4.9 `test(ui)`: in `src/components/md/MdDisclosure.test.js`, assert that `aria-expanded` toggles, the content is hidden while
92-
collapsed, and focus stays on the control. Verify: it fails before 4.8 is applied to `RunHistory`, then passes.
92+
- [ ] 4.9 `test(ui)`: in `src/components/md/MdDisclosure.test.js`, assert that the disclosure is a native `<details>`, so its `open`
93+
attribute toggles (no `aria-expanded`, the semantics are native), the content is hidden while collapsed, and focus stays on the summary. Verify: it fails before 4.8 is applied to `RunHistory`, then passes.
9394
- [x] 4.10 `fix(ui)`: drop the redundant `m-0`, `p-0` and `list-none` resets (TeamsPanel and the ten siblings), and replace
9495
`[overflow-wrap:anywhere]` with `break-words` or `break-all` on the identifier element (TeamsPanel, TeamMembersCard, TeamParentsCard,
9596
TeamLegacyGrants, AddMemberDialog, PrincipalsPanel, NodeInheritedSection, MdChipInput, EntryList, RepositoryWizard). Verify: no

0 commit comments

Comments
 (0)